Hi!
I'm trying to implement the following behaviour. I have an editable grid - if the user changes a value i want to show him a warning with the posibility of accepting or canceling that change. This is how i implemnted it :
void grid_BeforeCellUpdate(object sender, BeforeCellUpdateEventArgs e) {
if (grid.ActiveCell.Column.Key == "COL") {
try {
MessageBoxButtons btns = MessageBoxButtons.YesNo;
if (MessageBox.Show("If you change this all child values will be erased automatically. Are you sure you want to do this ? ", "Warning", btns) == System.Windows.Forms.DialogResult.No) {
e.Cancel = true;
}
else {
UpdatedContractRows.Add(e.Cell.Row);
catch (Exception ex) {
MessageBox.Show(ex.Message);
The problem is the following - if i click yes, the value is commited and it changes in the cell's value - as it should be. But, if i click No, the message box appears again and i have to click No again. only after that it cancels the event and the cell returns to the initial value.
Any ideea how can i fix this ?
Thank you!
Hello ,
I have test your code (except UpdatedContractRows.Add(e.Cell.Row); method, but as far as I understand this method do not cause any issues for you) with Infragistics 11.1 RTM and it work fine for me. Please run the sample with the mentioned version and let me know if this work for you.
I am waiting for your response.
Thanks Hristo!
I think you might've attached the wrong sample...
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components.
Hello,
Here is the correct one.
Thnak you.