I want to hook to an event that tells me whenever the selection of the row changes in the grid.
It's working fine with the afteractiverow event.
But, when I set an empty datasource to the grid, the grid shows nothing of course, but the afteractiverow event does not get raised.
Is there another event better that this to use?
Hello , I have tested your scenario and I was able to reproduce the behavior you have described. After I consult with our development team we found that this is desired behavior. AfterRowActivate is fired only when a active row is changed. In the scenario where you assigning a empty dataSource to the grid then the event didn’t get fired, this is because there isn’t active row, there isn’t a row to be activated by default. But if you assign a DataSource with rows then the first row will be activated and the event will be fired. The same happened when on the first assignment of dataSource.Also expected and reasonable will be to get active row as null since the assigned datasource doesn’t have rows in your scenario with empty dataSource. The similar situation we have when we change the Active row to be null, in this case the AfterRowActivate didn’t get fired because of the same reason.So the AfterRowActivate is fired only if the a real row is activated - when we activate a row and when we assign a datasource to a the grid with rows. But didn’t get fired when assigned datasource was empty. I believe you can use Mike’s suggestion which event you need to handle in order to get your application working in the desired way.Let me know if you have further questions.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
When a resolution is identified, a member of Developer Support will post information about the resolution here.
In the meantime, if we need more information from you, or if we have information that is not itself a resolution, we'll contact you through our support system.
You should have already received an email message sent to the email address on your Infragistics member profile, confirming that case number CAS-30899-TAU8J9 was logged for this issue. To provide updates to this case, or to check its status if you did not receive any email message, you can go to the My Support Requests page of our website.
will the support team come to this thread and reply to the topic?
If the grid has a DataSource and an ActiveRow and then you set the grid's DataSource to a data source with no rows, then theoretically, the grid's ActiveRow should change from a row in the first data source to null. So I would think the event should fire at that point. If not, it might be a bug.
I'm going to forward this thread over to Infragistics Developer Support so they can look into it.
In the mean time, perhaps you can use the InitializeLayout event to refresh whatever you need. This event will fire any time the grid's DataSource is changed.