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

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

2 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JD.
Top achievements
Rank 1
JD. asked on 28 Sep 2011, 03:38 AM

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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Sep 2011, 05:03 AM
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.
0
JD.
Top achievements
Rank 1
answered on 28 Sep 2011, 11:26 AM
Hi

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

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

Regards


Tags
Grid
Asked by
JD.
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
JD.
Top achievements
Rank 1
Share this question
or