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.

how avoide from highlighting the row in grid

Thread ID:

Created:

Updated:

Platform:

Replies:

61413 May 25,2007 05:18 AM May 25,2007 11:39 AM Windows Forms 1
loading
Tags: GridControl
swaminath dhavane
Asked On May 25, 2007 05:18 AM

hi,
i have dispayed records in grid and when i click on row header of Grouping Grid control entire row is getting highlighted with some colour.
But i dont want to highlight the row.

haneefm [Syncfusion]
Replied On May 25, 2007 11:39 AM

Hi Swaminath,

For cell based selection in a grid :
>>>>>>>>>>>>>>>>>>>>
You can try this code.

this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any ^ GridSelectionFlags.Row ;

For record based selection in a grid:
>>>>>>>>>>>>>>>>>>>>
You can handle the SelectedRecordsChanging event and set e.Cancel to true for the RowHeaderCell. Below is a code snippet that show this task.

this.gridGroupingControl1.SelectedRecordsChanging +=new SelectedRecordsChangedEventHandler(gridGroupingControl1_SelectedRecordsChanging);

private void gridGroupingControl1_SelectedRecordsChanging(object sender, SelectedRecordsChangedEventArgs e)
{
if( e.Action == SelectedRecordsChangedType.Added )
e.Cancel = IsRowHeaderCell;
}

Please refer to the attached sample for implementation and let me know if this helps.
GGCCancelRowSelection.zip

Best regards,
Haneef

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.

;