Hi,
I have searched the forum and saw previous posts, however, it does not seem to work for me. I would like to disable that rows can be selected and set the following:
e.Layout.Override.SelectTypeRow = SelectType.None;e.Layout.Override.SelectTypeCell = SelectType.None;
However, in Infragistics 9.1, I can still select the rows and get OnBeforeRowActivate events. What do I have to do additionally?
Regards,Reto
Hi Reto,
The basic issue here is that you are mixing up Seleted and Active. BeforeRowActivate is for when a row becomes the ActiveRow, it has nothing to do with selection.
I beleive what you want to do is stop the ActiveRow from appearing selected. Here's some information on how to do that:
FAQ:How do I turn off the ActiveRowAppearance so that the active row in the grid does not appear selected.
Hello ,Reto
You are able to disable the selection of the row , but BeforeRowActived will be still firing.
I am not sure that you can cancel the BeforeRowActivate and in the same time to have the ability of copy , paste and select the data from the grid. That's because when you click on the cell , the row is activating . And if you Disable the Activation , than you are not able to select , copy and paste any data.
Sincerely,
Danko Valkov
Developer Support Engineer
Infragistics, Inc.
thanks for your response. With your proposal, it works that I cannot activate a cell anymore. That's good.
However, the whole is no like disabled and I cannot even copy-paste text out from cells. Now, I have found the following solution.
1. Set SelectTypeRow to NONE, to disable selection2. In OnAfterRowActivate() set the ActiveRow = null to cancel the row activationI did not find a way to cancel the OnBeforeRowActivate() event, which would have been nicer. But the above solution seems to work.
Regards,
Reto
I am not exactly sure what you are trying to achieve , but you can change the appearance of the selected row. If you don’t want to use appearances at all , you are able to reset them like -
ultraGrid1.DisplayLayout.Override.ResetAppearances();
If you want to deactivate the selection at all, you can use the following code snippet :
private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e)
{
e.Row.Activation = Activation.Disabled;
}
Please let me know if I can provide additional help.