New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RadDataGrid doesn't allow row selection if removed and re-added to visual tree. #461
Comments
Hi @Going-Gone , The observed by you issue is not caused by the DataGrid control, but by the UWP framework itself. For some unknown reason the framework raises Unloaded event for the control while actually the control is loaded and is operational. As we are expecting the framework to raise the right events, currently we cannot apply any fix in the DataGrid control. On your own risk you can try to remove the logic that checks whether the control is operational and thus the selection functionality should not depend on it - after that you can build a nuget by yourself and use it in your application: protected override bool IsOperational
{
get
{
return base.IsOperational && this.Owner.IsLoaded && this.suspendedCount == 0;
}
} replace with: protected override bool IsOperational
{
get
{
return this.suspendedCount == 0;
}
} Please, be aware that such a change is very risky and might result into an unexpected behavior when the control is actually unloaded. I hope the provided information will be helpful for you. |
When this happens. IsOperational && IsLoaded both = true, and suspendedcount = 0. If I loop through the itemsource and select one item at a time, this problem goes away. If I use the SelectAll() the problem happens, so something with the SelectAll must be off. Target version 18362 |
@Going-Gone It seems the observed by you issue is not the one described in #94. In #94 the selection is performed using the mouse while here you are mentioning the SelectAll method which is part of the programmatic selection of the control. I will need a sample project that demonstrates your exact scenario and setup of the DataGrid in order to continue my investigation. Without being able to observe the issue on my side I cannot tell for sure what is causing it. |
Description
If you target windows version 16299, this bug does not occur. If you target anything higher, then the bug occurs.
Reference to bug. Can we please look for a solution for this?
#94
The text was updated successfully, but these errors were encountered: