Hello,in my WebDataGrid I want to let the user add new records. The first column is the key column and the values entered into this field have to be unique. So I wanted to use the CellEditing_ExitedEditMode event.
Here I want to validate the entered value and if the entered value is already in that grid I tried to use "eventArgs.set_cancel(true)". I know this property is available in eventArgs of the CellEditing_EnteringEditMode event and also the method to set that value.
see screenshot2
Unfortunately a similar property and the method are not available in the CellEditing_ExitedEditMode as you can see in screenshot 2
Why is that property and method not available? Has this a special reason? If I can prohibit editing a cell I think it should also be possible to cancel editing. How can I do that now?
Hi Martinn,
Do you have any additonal questions regarding this matter? If so, please let me know how I can help.
SincerelyTroyDeveloper Support Engineer
Hi,
Okay, I've taken a look at your sample and tested a few times. The outcome is that at the CellEditing_ExitingEditMode event, I only get the alert once (provided I change value for ProductName to not = "Test"). Otherwise the event/message will keep firing and the focus is held until the change is made.
As a note, for this test I used IE8.
Please let me know if I can be of further assistance.
Sincerely,TroyDeveloper Support Enginner
I wanted to update you on this case. I am parsing through the code of the sample and I will get back to you as soon as I have further information. Presently, I'm having to solve a sql connection string issue to get the sample up and running.
Sincerely,TroyDeveloper Support Engineer
Hi,Okay, I'm taking a look over what you have here. I will send you an update tomorrow as to what I discover.Sincerely,TroyDeveloper Support Engineer
Ok, I found the value in the eventArgs and so I'm able to deside to accept that value or not. An other "strange" behavior is this: In my former used (-Exited) procedure I found the value and could display a single message eg. ("wrong value") as I wrote in the example above. But now if I use the -extiting event it seems to be fired two times because I get two "alerts". I did not change anything else. Only using the suggested method. Any further suggestions?