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
770
How to add validator contorl to the gird
posted

hi

 

I am inhereting WebDataGrid and adding validtor contorl in CreateChildContorls() method. 

like

Controls.Add(validatorContolr); -- i will get bellow error

Unable to find control id 'CustomGrid1' referenced by the 'ControlToValidate' property of 'OrderIDRequiredFieldValidator'.

If i changed the code bellow like this

Page.Forms.Contorls.Add(validatorContorl);  --   i will get bellow error

The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

 

 

  • 24671
    Suggested Answer
    posted

    Hi Sai,

    What exactly would you like to achieve in your application? You can use Editor Providers, and then attach a Microsoft validator control to your editing control. 

    Regards,

    Angel