First of all I'd just like to say that I'm very new to Infragistics (only been using it for about a week actually), so I apologise if this is very simple but I'd appreciate the help!
Basically I'm struggling to find an option to switch off multiple row selection in my UltraGrid.
I only noticed this as I've added buttons to my form to allow my user to navigate Next/Prev/First/Last within the grid. When you navigate using the buttons, all is fine and works as you'd expect. Then if you select another row using a mouse click (without holding any keys etc), and go back to using the Next/Prev/First/Last buttons to navigate the row you selected with the mouse is still highlighted. So you end up with two rows highlighted when only one of them is actually active.
As I say, apologies if it's a very simple fix but I've spent ages running through as many of the Properties as I could find but couldn't find any option that sounded relevant to my problem.
Thanks again for your help. I have tried this and I do have SelectTypeRow but it still won't recognise "Infragistics.Win.UltraWinGrid.SelectType.Single;" so unfortunately I don't know whether this is what I'm after.
I'm assuming from your response that "SelectedAppearancesEnabled" is not available to me in v9.1?
Hello,
I have verified that there is SelectTypeRow in NetAdvnatage 2009 vol1. The code looks like the following:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single; }
Please let me know if this works for you or if this is not what you are looking for.
Hi Danko,
Thanks for your quick response. Unfortunately I forgot to mention that I'm actually only using v9.1 of UltraWinGrid. This means that I don't actually have either SelectedAppearancesEnabled, nor SelectType, so I can't do as you've instructed.
Is there any other way of me solving this using only v9.1?
If you mean that you would like to have only ActiveRowAppearance than you could disable the SelectedAppearances like the following in the InitalizeLayout event :
void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e) {
e.Layout.Override.SelectedAppearancesEnabled = DefaultableBoolean.False;
}
If you just want to be able to select one row at a time than you probably should set the following in the same event:
e.Layout.Override.SelectTypeRow = SelectType.Single;
Please let me know if I misunderstood your scenario.