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. Image for the cookie policy date

Disable cell highlighting on GDBG

Hi, I am using GDBG to show the contents of datatables. The grids are set as no adds, deletes or edits, but you can still select cells and the hightlight as if an edit is possible, though no changes are accepted. If a date field is selected, it even opens the datetime picker. The app supports column dragging and row selection so this must be retained. It also has context menu items that respond to the current row clicked on. Selecting cells is OK, it''s just the highlighting and opening edit controls that is perplexing our clients. Is there a way to turn this behavior off? Thanks, Doug

4 Replies

AD Administrator Syncfusion Team February 24, 2004 01:24 PM UTC

If you want to avoid a cell ever starting to edit, cancel the CurrentCellStartEditing event.
private void gridDataBoundGrid1_CurrentCellStartEditing(object sender, System.ComponentModel.CancelEventArgs e)
{
	e.Cancel = true;
}


DL Doug Lind February 24, 2004 05:08 PM UTC

Thanks Clay, it worked great! >If you want to avoid a cell ever starting to edit, cancel the CurrentCellStartEditing event. > >
>private void gridDataBoundGrid1_CurrentCellStartEditing(object sender, System.ComponentModel.CancelEventArgs e)
>{
>	e.Cancel = true;
>}
>


CR Chris R February 27, 2004 11:55 AM UTC

Is there a way to do this on a per column basis?


AD Administrator Syncfusion Team February 27, 2004 02:28 PM UTC

Try checking grid.CurrentCell.ColIndex to decide whether you want to cancel or not.

Loader.
Live Chat Icon For mobile
Up arrow icon