Grid : ComboBox MultiColumn : Client Side Validation : How to Access Controls

3 posts, 0 answers
  1. JD.
    JD. avatar
    37 posts
    Member since:
    Aug 2012

    Posted 27 Sep 2011 Link to this post

    Hi
    I have a Grid, Add/Editing of record is done using EditMode="PopUp"  
    Inside a FormTemplate  I have a MultiColumn ComboBox and a TextBox to enter landline no.
    I have ASP.NET customValidator besides Textbox and want to perform client side validation. ( Using JQuery ? )
    It should check that First two characters entered in landlineno Textbox matches with CityCode Column used in ComboBox Template.


     <telerik:RadGrid ID="RadGrid1" >
      ....
    <MasterTableView EditMode="PopUp"  >
    ....
    <EditFormSettings PopUpSettings-Modal="true" >
    ....
    <FormTemplate >
    ......
    .....
      <telerik:RadComboBox ID="RadComboBox2" Runat="server" TabIndex="3"
                          DropDownWidth="320px"
                          HighlightTemplatedItems="true"
                            DataSourceID="EDSStateList" DataTextField="StateName"
                            DataValueField="StateCode" SelectedValue='<%# Bind("FK_StateCode") %>'>
                            <HeaderTemplate>
                             <ul>
                                <li class="col1">StateName</li>
                                <li class="col2">CityName</li>
                                <li class="col3">CityCode</li>
                            </ul>
                            </HeaderTemplate>

                             <ItemTemplate>
                                <ul>
                                    <li class="col1">
                                        <%# DataBinder.Eval(Container.DataItem, "StateName")%></li>
                                    <li class="col2">
                                        <%# DataBinder.Eval(Container.DataItem, "CityName")%></li>
                                    <li class="col3">
                                        <%# DataBinder.Eval(Container.DataItem, "CityCode") %></li>
                                </ul>
                            </ItemTemplate>

                             <FooterTemplate>
              
                            </FooterTemplate>

                        </telerik:RadComboBox>
    .....
    ....
    ....
    <FormTemplate >

    -JD

     

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Sep 2011 Link to this post

    Hello,

    You can try the following code library approach to achieve your scenario.
    Accessing server controls in a grid template on the client.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. JD.
    JD. avatar
    37 posts
    Member since:
    Aug 2012

    Posted 28 Sep 2011 Link to this post

    Hi

    Little complex to understand. Is there a easy way out ?

    Jayesh : You have any suggestion?  or any sample code?

    Regards


Back to Top