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
115
Dropdownprovider validation
posted

Hi,

I need to add validation for all the dropdownprovider inside the WebDatagrid like if the DropdownProvider default value ' --Choose Product--' not changed to any product from the list.Then validation should occur.

Thanks,

rakesh

Parents
No Data
Reply
  • 1320
    Offline posted

    Hello Rakesh,

    After investigating this further, I determined that your requirement could be achieved by adding a RequiredFieldValidator the following way:

    <ig:WebDataGrid ID=”wdg”>

    . . .

    </ig:WebDataGrid>

    <asp:RequiredFieldValidator ID="Validator1" Text="Item is required" runat="server" ControlToValidate="wdg"></asp:RequiredFieldValidator>

    A ValidatorId should also be added to the column, which is bound to the dropDown provider:

    <ig:CellEditing >

        <ColumnSettings>

              <ig:EditingColumnSetting ColumnKey="DropDown1" EditorID="wdg_DropDownProvider1" ValidatorID="Validator1" />                                  

         </ColumnSettings>                               

    </ig:CellEditing>

    In order for this to work jQuery scripts should be added in the file and in the web.config in the configuration tag the following lines of code:

    <appSettings>

        <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />

    </appSettings>

    Below I am attaching a sample demonstrating how this could be achieved. Please test it on your side and let me know if you need additional information regarding this matter.

    Regards,

    Monika Kirkova,

    Infragistics

    WebDataGridDropDownProvider.zip

Children
No Data