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

OnSaveChanges

Thread ID:

Created:

Updated:

Platform:

Replies:

19243 Sep 21,2004 09:35 PM UTC Sep 21,2004 11:39 PM UTC WinForms 1
loading
Tags: GridControl
Madhavi Balusu
Asked On September 21, 2004 09:35 PM UTC

Hi, I am using a user control in my GridDataBoundGrid cells and am using GridTextBoxCellRenderer as the renderer. In the Renderer''s Validating EventHandler, I set CurrentCell.IsModified = true; however, my OnSaveChanges is not getting called!! I saw in one of this forum messages you said I have to do this: m_eGrid.CurrentCell.EndEdit(); m_eGrid.Binder.EndEdit(); This did not make the OnSaveChanges to be called either. What am I missing? Another question, can I access the grid''s binder from the renderer or the model?

Administrator [Syncfusion]
Replied On September 21, 2004 11:39 PM UTC

It is not clear to me what you mean by using a UserControl with a GridTextCellRenderer. If you are trying to embed a UserControl in a grid cell using a derived cell type, then your usercontrol should raise an event when its value changes (whatever that means for your user control). (For example, if you are using a TextBox to hold a value in your user control, and this is the value that represents the value for your user control, then a TextBox.TextChanged event could serve as the user controls''s value changed event.) Then the cellrenderer class would listen for this value changed event of the user control. In the renderer''s handler for this event, you would use code like:
if (!this.NotifyCurrentCellChanging())
	this.Grid.CurrentCell.IsModified = true;
to tell the grid that the cell has changed and set the IsModified property. In this manner, the above code would be hit everytime your usercontrol is modified. If you cannot get this to work, post a sample project showing what you are trying to do.

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

;