Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
29181 | May 18,2005 03:51 PM UTC | May 26,2005 06:13 PM UTC | WinForms | 10 |
![]() |
Tags: GridControl |
CurrentCell.IsModified = true;
In order for OnSaveChanges to be called, CurrentCell.IsModified must be true.
>CurrentCell.IsModified = true;
>
>
>In order for OnSaveChanges to be called, CurrentCell.IsModified must be true. private void editTextBox_DecimalValueChanged(object sender, EventArgs e) { if(ControlValue == null || (double)ControlValue != editTextBox.DecimalValue) { if(CurrentCell.NotifyChanging()) { CurrentCell.IsModified = true; CurrentCell.ConfirmChanges(); ControlValue = editTextBox.DecimalValue; NotifyCurrentCellChanged(); } } }
public void NotifyChanged() { TraceUtil.TraceCurrentMethodInfoIf(Switches.CurrentCell.TraceVerbose, grid.PaneDesc); if (!IsInActiveOrDeactivate) { IsModified = true; Grid.RaiseCurrentCellChanged(); } }Your change event that calls NotifyCurrentCellChanged() does not get raised on every keystroke, and but instead is only being raised as you are leaving the cell, and this is why IsModified was not being set properly in your case. Because of this, I think you will have to either change things so your change event is raised on each keystroke (so things get set before you try to leave the cell), or try to tweak the above suggested code to work around the problems you have found. If you can upload a little sample showing exactly what you want to handle, maybe we can tweak it to get things working.
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.