Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
468
RequiredFieldValidator not working on a grid column
posted

I have a databound grid. I have added WebDateTimeEdit1 to BirthDate column of my grid.  this is how Iam adding this..

 

 

UltraWebGrid1.DisplayLayout.Bands[0].Columns[5].EditorControlID = WebDateTimeEdit1.UniqueID;

UltraWebGrid1.DisplayLayout.Bands[0].Columns[5].Type = Infragistics.WebUI.UltraWebGrid.

 

ColumnType

.Custom;

UltraWebGrid1.DisplayLayout.Bands[0].Columns[5].Header.Title =

 

"mm/dd/yyyy"

;

BirthDate is a required field, and I have a RequiredFieldValidator, one's I added the WebDateTimeEdit required field validator is not working.

Is there a way that I can set the RequiredFieldValidator on serverside, or is it a bug that WebDateTimeEdit and RequiredFieldValidator doesn't work together.

Iam using 2008vol3, C#. any insight would be helpful. thanks.

 

Parents
No Data
Reply
  • 45049
    posted

    You need to connect your validator to the WebGrid column, instead of to the editor control used by that column.

    The following help article, taken from our online help documentation of NetAdvantage for .NET 2008 Volume 3, shows how to do this:
    Validating Cells

    The article uses a RangeValidator in its example.  It's simple enough to replace this with a RequiredFieldValidator.

Children