I have also set GridViewCellValidatingEventArgs ErrorMessage when get duplicate data.Now I want show error message
in rectangular box as alert with red color and set focus on error message cell.
Thanks
7 Answers, 1 is accepted
Please provide us with more details about your requirements and expectations for the appearance of the Error Message. Following up this forum thread, when an item is edited or a new one is added, an immediate validation is performed. That results in coloring the borders of the cell with the incorrect value in red and a red Message Box appears with an explanation of the error. You can find more information about data validation in our online documentation.
Maya
the Telerik team
error cell.Would please give me some idea how can i popup this error message rectangular automatically like other error field.
You need to change the Templates for the Invalid States and to use a ContentControl instead of the ToolTip. I am sending you a sample project with all the predefined Templates.
I hope that helps.
Kind regards,
Maya
the Telerik team
I get an exception on Cell Validating. The exception is: "System.InvalidOperationException: Cannot resolve TargetName border".
Is there any reason I shouldn't be able to run this sample. I'm using RadControls for Silverlight version 2010.2.812.
Thank you.
I have updated the sample project so that the Exception you are receiving will not be raised and the cause for it is removed.
Maya
the Telerik team
could you please specify how I have to modify my files in order to have the same style for the error message BOTH IF it is the default message ("input string is not in a correct format", which appears for example if I enter a letter in a column with numeric values) AND if I use the cellvalidation event and I set the error message from code?
Thank you very much.
If you want to edit the ToolTip of the default validation coming from the Framework, you can edit the template of the TextBox itself. The approach should be similar to the one illustrated in the sample attached above.
Please let me know if you need any further assistance with it.
Maya
the Telerik team