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.
Unfortunately, activation email could not send to your email. Please try again.

Prevent 1st row auto selection in ListBoxSelectionMode

Thread ID:

Created:

Updated:

Platform:

Replies:

77697 Nov 13,2008 05:45 AM Nov 14,2008 08:09 AM Windows Forms 1
loading
Tags: GridControl
Geoff Parker
Asked On November 13, 2008 05:45 AM

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


Rajadurai C [Syncfusion]
Replied On November 14, 2008 08:09 AM

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



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;