We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Prevent 1st row auto selection in ListBoxSelectionMode

HI,

I would like to prevent the 1st row from being selected when I set my grid as below.

Grid.ListBoxSelectionMode = SelectionMode.MultiExtended

Also is there a way of removing the current row triangle indicator.

Cheers
Geoff


1 Reply

RC Rajadurai C Syncfusion Team November 14, 2008 01:09 PM UTC

Hi Geoff,

Thanks for your interest in Syncfusion products.

You can prevent the first row from being selected while setting the ListBoxSettingMode property to MultiExtended by including the following code in Form_Load event handler.

this.gridDataBoundGrid1.Selections.Ranges.Remove(GridRangeInfo.Row(1));



To remove the currentrow triangle indicator set the celltype of rowheader as header in PrepareViewStyleInfo event handler.

void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if (e.RowIndex > 0 && e.ColIndex == 0)
e.Style.CellType = GridCellTypeName.Header;
}


Regards,
Rajadurai



Loader.
Live Chat Icon For mobile
Up arrow icon