|77369||Oct 29,2008 11:03 AM UTC||Oct 30,2008 01:25 PM UTC||WinForms||1|
this.gridDataBoundGrid1.DefaultRowHeight = 50;
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.
or the page will be automatically redirected to sign-in page in 10 seconds.