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

"Global" RowHeight, "SelectionMode" and Cell-State

Thread ID:





77369 Oct 29,2008 11:03 AM UTC Oct 30,2008 01:25 PM UTC WinForms 1
Tags: GridControl
Asked On October 29, 2008 11:03 AM UTC


I have some questions which I was not able to figure out by studying the Dashboard-Samples...(may be I've just ovelooked something):

1.) I want to set the RowHeight-Property for all rows in the GDBG at once. Is there a "global" Property to do it or do I have to loop through all Rows somehow?
2.) How can I prevent the RowHeight from being resized by mouse?
3.) How can I know the state of a particular Cell (while Drawing) -> is MoseHover, is it contained in the current Selection...
4.) If user clicks somewhere in the Grid I want to find out which Cell was hit and to which Row it belong, then I want to mark the whole Row as selected (a kind of "Only whole Rows can be selected" - mode). It shall be also possible to select multiple Rows by clicking around and holding the Shift-Key pressed. Is there some "SelectionMode"-Property available in GDBG?


Rajadurai C [Syncfusion]
Replied On October 30, 2008 01:25 PM UTC

Hi Silver,

Thanks for your interest in Syncfusion products.

Please find below the solutions for your queries.

1) To set the row height for all rows, you can use DefaultRowHeight property.

this.gridDataBoundGrid1.DefaultRowHeight = 50;

2) To stop resizing the row heights by mouse, you can cancel this action in the ResizingRows event.

private void gridDataBoundGrid1_ResizingRows(object sender, GridResizingRowsEventArgs e)
e.Cancel = true;

3) You can retrieve the cell state by using the following code.

private void gridDataBoundGrid1_CellMouseHover(object sender, GridCellMouseEventArgs e)
textBox3.Text = "Cell is in current selection and mousehovered state";
textBox3.Text = "Cell is not in current selection and mousehovered state";

4) To find out the row that is being hit, please use the following code in CellClick event handler:

GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
this.textBox1.Text = this.gridDataBoundGrid1[cc.RowIndex,cc.ColIndex].CellType.ToString();
int row = this.gridDataBoundGrid1.CurrentCell.RowIndex;
this.textBox2.Text = row.ToString();

It is possible to mark the whole row as selected on clicking a cell in that row as well as turn on multiple row selection by setting ListBoxSelectionMode property to MultiExtended.

this.gridDataBoundGrid1.Model.Options.ListBoxSelectionMode = SelectionMode.MultiExtended;

Please refer the following sample that does the same.



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