Is there a way to set up the ultrawingrid (on a windows form, vb.net 2.0, windows xp) so that the active row and selected row are always the same? It is confusing to my users when a row is highlighted and then they click on another row and that becomes the active row, but it is not selected.
Thanks,
Disable Selected Row Display: Example: GridName.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.None
Active row is the row that has the input focus and there can be only one active row which is grid.ActiveRow.
Selected row is a row that has been selected by code or by a mouse click. A single mouse click activates and selects the row that was clicked. Another click with the CTRL key selects the other row too. Selected rows can be accessed via grid.Selected.Rows.
I am prettu confused with active row and selected row. Can you please suggest the difference b/w the two?
Thanks
Hi Markus,
mac_swit said:there is no code changeing something. I click on a cell and check the selected rows count at breakpoint in the AfterRowActivated-event. After that the cell is in edit mode with selected text as it should be. Then I click on a button and check the selected rows count in the button click event again. Count is 0.
That explains it, then. If there's a cell in edit mode, you cannot have a selected row. Going into edit mode on any cells clears the selection.So your selected row is getting cleared before you leave the grid - it's getting cleared almost immediately after you set it.
Hi Mike,
there is no code changeing something. I click on a cell and check the selected rows count at breakpoint in the AfterRowActivated-event. After that the cell is in edit mode with selected text as it should be. Then I click on a button and check the selected rows count in the button click event again. Count is 0.
Because I have application style library I don't like setting colors in certain grids. The workaround for me is to check the selected rows count and add the active row as the only one row to the selected rows collection to make sure I'm dealing with the right row.
Markus