Hello
I have a problem with the add new row while validating.
How can i cancel changes in the row (what i manage to do) and cleaning the temporary data in the addNewRow that i can not use anymore... ?
I've tried to used :
AddNewRowSettings.AllowAddNewRow = Infragistics.Controls.Grids.
AddNewRowLocation.None;
But it isn't enough...
Thanks, regards
Hi,
Sounds like you just want to ExitEditMode:
this.grid1.ExitEditMode(true);
That should do the trick.
-SteveZ
Hello,
Your help didnt solve my problem.
Can you play the video? I've just seen i'm not able to to it.
If so, i would use youtube or another video provider.
Thanks,
Regards
I was able to play the video. It's actually playable, but for some strange reason you have to wait a few minutes before the video player is loaded ...
From what I've seen, Steve's suggestion should do the trick for you. I tested this out and it worked for me. Attached is the sample that I used for my test.
What I did is the following:
1. Click the "Add Record" button to display the Add New Row.
2. Enter some alphabetical characters in the "Int" field so the validation fails
3. Click "Discard" button to cancel the operation
4. Click the "Add Record" button again and check if the operation is correctly canceled
Is this what you're looking for ?
Regards,
Yes, you have understood well. The second click on the button add should show an empty AddNewRow.
Thanks
Did you have the chance to take a look at the attached sample? Does it help to resolve your issue ?
Your sample didn't help me so much. I use your code but i still have the same problem :
So i wonder if its because I'm using the XamGrid v11.1 and not the 11.2 or if because when i click on cancel buton i set the property of the grid named "IsEnabled" to false. To add a new row, i have to click to a first button to set "IsEnabled" at true.
Thanks for you help
Could you attach a small sample that I can use to reproduce your issue ?
HI,
Thanks for your sample.
I am reviewing it.
Sincerely,
MattDeveloper Support Engineer
Here a sample of what i ma trying to do.
Im so sorry to not manage to apply validation on the AddNewRow.
Thanks for you help.
Regards.
the xamGrid supports IDataErrorInfo and INotifyDataErrorInfo validation interfaces - so yes you could use this validation mechanism.
Here is a link to a sample and one pointing to the help page.
I Hope this helps.
Before sending you my boring code, i have a question.
Can we use a validation in the XamGrid using the same way of thinking that :
https://es.infragistics.com/samples/silverlight
If so, can you send me a sample please? or an URL where it's shown please?
The problem occurs only when i try to validate the AddNewRow data. If ValidationErrors is empty, I can cancel the row and the problem does not occur.
However, when i cancel on a bad row with, the problem occurs. So the problem comes from validation. When data is not validated correctly, the XamGrid remember about the wrong row. I have to investigate to know where the data is stored.