Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
335
UltraGrid find and activate a row
posted

Hi

I have a grid and I refresh the grid after the user has done something to a record.

I want to activate the row the user was on. I know the ID of the row I am just having difficulty finding the correct expression to locate the row in the grid and then activate it.

I am currently trying

UltraGridRow[] rows = this.gridComponents.Grid.Rows.Where(s => s.Cells["ID"].Value == rowID).ToArray()

then if that had worked I would have done 

rows[0].Activate()

but no rows are returned so rows[0].Activate() obviously fails. The row IDs are the same as before the data was refreshed, I can see the row in the watch window, i can also see it in the grid after the refresh so how do I retrieve the row in order to activate it?

Thanks

Paul