HI,
I am using Infragistics UltraWinGrid ver7.3. I want to know how i can find the index of the selected row in UltraWinGrid at runtime? I need this as i have to set the row selected once i reload the grid as a part of refresh.
Selected property of the grid gives me the rows selected but not the index.
Thanks and regards
Casey
Hi Jerry,
I'm a little confused by your question. Active and Selected have nothing to do with expanding or collapsing. If you want to track when a row is expanded or collapsed, you can use the BeforeRowExpanded, AfterRowExpanded, BeforeRowCollapsed, or AfterRowCollapsed events. All of these events pass you the row.
If the user clicks on a row, that row will be both active and selected. At least, that's how it works by default. You could change that with any number of property settings such as CellClickAction or SelectTypeRow.
I'm really not sure what you are asking, or what selection has to do with it.
The active row is the row that the user clicks on. The selected row at any given time won't be the same as the active one. For instance, if a user clicks on an expansion + button, hopefully that row will be the selected one in case you have a "before" or "after" RowExpanded event, like I do.
The problem I'm having, is that I can't determine which + sign I've just clicked on so I can process the event.
Any ideas on what I need to do?
Thanks in advance,
Jerry
The ActiveRow is not the same thing as the selected rows. You probably can't get the select row indices easily. My guess is that you will have to use grid.Rows.IndexOf and pass in the row.
I'm not sure using the Index is a great idea, anyway, though. The index of the row might change when you reload the data. If any rows are added or deleted, for example. You might be better off using a primary key value in the row data itself.