I'm running into an issue with the following ultrawingrid property:ugParts.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect
I created an example project to demonstrate the issue. In the project there is an ultrawingrid and a standard button. The ultrawingrid initializelayout event is handled setting properties of the grid (including the CellClickAction) similar to the way we have our production application setup.
When you click the button it will activate the next row in the ultrawingrid. Clicking the button immediately after the form is loaded works as expected activating the next row. If you click on a row in the middle of the ultrawingrid and then click the button notice it activates a different row, but the row clicked on remains selected. I'm trying to get a single row selection behavior that will not allow individual cells to be selected when a user clicks on a row or the row activation is changed by the application. Is there something I'm doing wrong?
Download the Example UltraWinGrid Project Here
The previous row is not selected - it's active.You may want to also set the ActiveRow in the grid. Or, if you only care about a single row, then you probably want to turn off selection (set SelectTypeRow to None) and just deal with the ActiveRow.
If you do need to work with selected rows, then perhaps you should turn off the ActiveRowAppearace: FAQ:How do I turn off the ActiveRowAppearance so that the active row in the grid does not appear selected.
I did some further testing using the test application linked to above. The previous row IS selected. We do not want to change the selecttyperow to none as we want it to be single. Secondly our issue is not related to the appearance.
Here are the test steps I followed running the test application to figure out this appears to be a bug with selection/activation.
After step 3 the selected index should also be 1. The work around for this is when you click the select next button I have the activeRow.Selected property set to false.
ugParts.DisplayLayout.Override.SelectTypeCell = Infragistics.Win.UltraWinGrid.SelectType.None
ugParts.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect