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.

lock a cell in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

96639 Sep 23,2010 10:52 AM Sep 24,2010 03:01 PM Windows Forms 1
loading
Tags: Grouping
Sai Pavan Kumar
Asked On September 23, 2010 10:52 AM

HI

If the user alters a cell in a GRID GROUPING CONTROL, then he has to click on any of the 4 buttons that i have in my UID.

If user alters and does not click on any of those buttons, he should not be able to move out of the cell.
Cursor has to get locked into that particular cell of GGC, unless he clicks any one of those 4 buttons.

Help me out..

Thanks
pavan




Rajadurai C [Syncfusion]
Replied On September 24, 2010 03:01 PM

Hi Pavan,

Thanks for your interest in Syncfusion Products.

To prevent a cell focus getting moved away after modifying the content until any of the buttons placed in UI is clicked, you can handle the TableControlCurrentCellMoving event with the following code.

// Event Handler
this.gridGroupingControl1.TableControlCurrentCellMoving += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellMovingEventHandler(gridGroupingControl1_TableControlCurrentCellMoving);

// Method Invoked
void gridGroupingControl1_TableControlCurrentCellMoving(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellMovingEventArgs e)
{
if (e.TableControl.CurrentCell.IsModified)
e.Inner.Cancel = true;
}

As the button is placed in UI, the focus can be moved to button from the grid provided the CausesValidation property is set.

Regards,
Rajadurai


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.

;