Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Infragistics UltraGrid: how to remove default selection of first row

I have put an UltraGrid on a WinForms user control. I have tweaked some settings so I can use the grid as a read-only multi-row select table. But there's one problem: by default the first row appears to be selected.

But the Selected.Rows property is empty, and also the ActiveRow property is null.

So the row appears to be selected, but it actually isn't, making it impossible to remove the selection.

I'm sure there must be a setting hidden somewhere on the UltraGrid to control this behavior. And if this is not the case then maybe there's a workaround?

Thanks.

like image 415
Gerrie Schenck Avatar asked Mar 12 '09 15:03

Gerrie Schenck


2 Answers

After some more research I have found a solution, which I'll share with all of you:

myUltraGrid.DisplayLayout.Override.ActiveCellAppearance.Reset();
myUltraGrid.DisplayLayout.Override.ActiveRowAppearance.Reset();
like image 152
Gerrie Schenck Avatar answered Oct 26 '22 04:10

Gerrie Schenck


try this:

this.ultraGrid1.SyncWithCurrencyManager = false;
this.ultraGrid1.DisplayLayout.Override.RowSelectors=DefaultableBoolean.False;
like image 22
stefano m Avatar answered Oct 26 '22 04:10

stefano m