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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Prevent user from deleting a column in GDBG ?

Thread ID:

Created:

Updated:

Platform:

Replies:

24156 Jan 29,2005 04:46 AM UTC Jan 29,2005 06:41 AM UTC WinForms 1
loading
Tags: GridControl
David Bosak
Asked On January 29, 2005 04:46 AM UTC

I want to select a column in GDBG to move but I don''t want user can delete this column by press Delete key. I try to catch KeyDown,KeyPress event on GDBG but it''s no effect. Please, help me. Thanks.

Administrator [Syncfusion]
Replied On January 29, 2005 06:41 AM UTC

Try handling the grid.Model.ClearingCells event.
private void Model_ClearingCells(object sender, GridClearingCellsEventArgs e)
{
	foreach(GridRangeInfo r in e.RangeList)
	{
		if(r.IsCols)
		{
			e.Handled = true;
			e.Result = false;
			break;
		}
	}
}

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.

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

;