Hello,
I have an ultragrid used for search results bound to a binding source. When the search criteria are changed the rows in the underlying binding list are changed. The binding source sends a ListChangedType.Reset event to the grid. The user can also apply filtering within the grid. So, the rows shown in the grid depend on both the search criteria and any filters applied in the grid.
I have enabled both the NoRowsInDataSource message (search criteria returned no results) and the NoVisibleRows message (grid filtering out all rows). When the user changes the search criteria such that results are available but filtered out by grid filter, the grid is failing to update the state change from NoRowsInDataSource to NoVisibleRows. The ListChangedType.Reset event is sent to the grid. Inspecting the UIElements, the EmptyMessageRow.EmptyMessageType is still NoRows when it should be NoVisibleRows.
I've built various sand boxes for a binding source with filtering attached to a grid with filtering. The sandboxes always update the state and no rows message correctly.
Any suggestions on what to look for here?
Wendy
I have created a support ticket for you with id CAS-105295-P9D9L5, so I will update you via this case as soon as I have information for you.
Thank you for using Infragistics Components.
Hi Wendy,
Thanks for the sample. There's clearly an inconsistency here since the grid shows two different messages in the same situation.
I'm going to forward this thread over to Infragistics Developer Support and ask them to create a case for you and write this up as a bug for developer review so we can get it fixed.
Hello Mike,
I have created a sandbox that shows similar failure scenarios where the no rows message fails to update correctly, see attached, steps to reproduce are on the form. In the sandbox, the NoRows message typically fails to update from NoVisibleRows to NoRowsInDataSource. There are also two work arounds that fix the failures in the sandbox, setting SyncWithCurrencyManager = true or programmatically correcting the EmptyRowMessageState in the ListChangedType.Reset event.
Unfortunately neither work around fixes the application code which tends to freeze with the state NoRowsInDataSource. The application uses SyncWithCurrencyManager = false as active row changes trigger events to update other controls with data related to the active row. The intent is to only update the other controls based on active row changes by the user not due to data source changes changing the active row via the CurrencyManager. This could be done differently using SyncWithCurrencyManager = true, but still doesn't correct the NoRows behaviour in the application. The work around to programmatically correct the EmptyRowMessageState fixes the noRows state message only after toggling the datasource change twice. It doesn't catch the first state change; mainly as I can't get the empty row to redraw through calls to UIElement.DirtyChildElements or Grid.Refresh or ... (Is there any straightforward way to force a UIElement to refetch it's state and redraw - Control.Refresh usually has no effect.)
So, the sandbox and work arounds show the failing behaviour but not a reliable fix. I've attached the sandbox as perhaps it might steer towards a reliable fix. I'm using the latest service release 12.2.20122.2010
thanks, Wendy
Let me see if I understand this correctly.
Wendy Smith said:When the user changes the search criteria such that results are available but filtered out by grid filter, the grid is failing to update the state change from NoRowsInDataSource to NoVisibleRows.
So it sounds like the grid is in a state where the data source actually has rows in it, but they are all filtered out and thus the grid is displaying the No Visible Rows message. At this point, the user makes a change which causes the data source itself to refresh and return no rows. And at this point, you are saying that grid still shows the No Visible Rows message instead of the No Rows in DataSource message. Is that right?
Does it work the other way? If there are no rows in the DataSource and then the user applies a filter to the grid (which essentially does nothing), does it correctly show the No Rows in DataSource message at that point?
Also, what version of the controls are you using? Do you have the latest service release?
How to get the latest service release - Infragistics Community
The scenario which you have described is a little bit complicated and if you could provide us a simple sample which demonstrate your issue I will be glad to investigate this further for you. So is it possible to post a simple sample that demonstrates this issue? Also please let me know the exactly version of Infragistics which you are using.
I am waiting for your feedback.