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.

Allowing only Full Row Selection in a GDBG with Static cells

Thread ID:

Created:

Updated:

Platform:

Replies:

56403 Feb 14,2007 10:19 AM Feb 14,2007 10:39 AM Windows Forms 1
loading
Tags: GridControl
Ryan Hardoon
Asked On February 14, 2007 10:19 AM

Hi
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 10:39 AM

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?"
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=118

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.

;