Infragistics UltraGrid: how to remove default selection of first row

Gerrie Schenck picture Gerrie Schenck · Mar 12, 2009 · Viewed 27.9k times · Source

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.

Answer

Gerrie Schenck picture Gerrie Schenck · Mar 12, 2009

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();