This is a migrated thread and some comments may be shown as answers.

Problem setting the Validation and Default value to GridView Date column.

0 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
SivaPrasad Bevara
Top achievements
Rank 1
SivaPrasad Bevara asked on 06 Jun 2012, 12:20 PM
Hi,

I am using Telerik controls for Silverlight 5.

I have a Date column in the GridView. I need to set the RequiredFiled validation for that column.
So I have added the "Data Annotation ([Required])" for that column.
It is properly validating that column in the edit mode when I remove the value and Tab out.

In the "ADD" mode, I need to set it as Blank by defalut and needed to validate that column on the Tab out.
As I need to set the "Blank" value, I have set the columns as Nullable and setting the null value in ADD mode.
It is propery displaying it as Blank, but when I Tab out from this column (When it is blank in the ADD mode) it is not validating it.
And, If I put some value in  to that column, commit it (by moving to another column) and come back to that column, remove value and Tad out then its properly Validating. I mean In the ADD mode, When it is blank it is not validating the column.

Please suggest, how can I make this column as Blank by defalut and Required in the ADD mode. 

Regards,
SivaPrasad.B
Tags
GridView
Asked by
SivaPrasad Bevara
Top achievements
Rank 1
Share this question
or