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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Allowing only Full Row Selection in a GDBG with Static cells

Thread ID:





56403 Feb 14,2007 03:19 PM UTC Feb 14,2007 03:39 PM UTC WinForms 1
Tags: GridControl
Ryan Hardoon
Asked On February 14, 2007 03:19 PM UTC

I am using a GDBG which is non editable and all cells are static. (just like a listbox)
I need a click on any cell to make the whole row highlighted.

Iset the AllowSelection to Row only and played with all sorts of other properties
I even did overriding to the Cell Click event and selected the whole row with code but that also doesnt work properly becuase the actual cell that was clicked remains white and is not highlighted like the rest of the row.
Can you please show me the best way to do it. Isnt there some kind of Property like in the regarding Visual Studio DataGrid .(Row Selection only)

Please help

Administrator [Syncfusion]
Replied On February 14, 2007 03:39 PM UTC

Hi Ryan,

This can be achieved by setting the ListBoxSelectionMode to One and handling the CurrentCellActivating event to set e.ColIndex to zero. Here is a code snippet.

this.gridDataBoundGrid1.ListBoxSelectionMode = SelectionMode.One;

private void gridDataBoundGrid1_CurrentCellActivating(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellActivatingEventArgs e)
{ e.ColIndex = 0;}

Here is KB article that shows you "How do I make a GridDataBoundGrid and a GridControl look exactly like a GridListControl using a DataTable datasource?"

Best regards,


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon