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

validating input controls inside radgrid

1 Answer 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hiren
Top achievements
Rank 1
Hiren asked on 10 Oct 2011, 10:59 AM
Inside repeater i had placed radgrid and a button outside the repeater, when i click on button i want to validation input data inside radgrid control, using javascript.

how to find radtextbox inside radgrid which is in repeater control.

<asp:Repeater ID="rptrGroup" runat="server" OnItemDataBound="rptrGroup_ItemDataBound">
  <ItemTemplate>
   <table class="table_data">
        <tr><td colspan="2">
              <telerik:RadGrid ID="rgdGroup" runat="server" Width="100%" GridLines="Vertical" AutoGenerateColumns="False"  OnItemDataBound="rgdGroup_ItemDataBound"  OnItemCommand="rgdGroup_ItemCommand" CellSpacing="0">                     <MasterTableView DataKeyNames="Id">
                <Columns>
               <telerik:GridCheckBoxColumn HeaderText="Status" DataField="Status" UniqueName="Status">
              </telerik:GridCheckBoxColumn>
              <telerik:GridTemplateColumn HeaderText="Order" DataField="Order" UniqueName="ActionOrder">
              <ItemTemplate>
             <telerik:RadTextBox ID="rtbOrder" runat="server" Text='<%# Eval("Order") %>'  Width="48px" MaxLength="3" />
           </ItemTemplate>
            </telerik:GridTemplateColumn>
           <telerik:GridBoundColumn HeaderText="Item" DataField="ItemName" UniqueName="ItemName">
           </telerik:GridBoundColumn>
          <telerik:GridTemplateColumn HeaderText="Date" DataField="Date" UniqueName="Date">
          <ItemTemplate>
         <telerik:RadDatePicker ID="rdpDate" runat="server" Culture="en-US" Width="100px" SelectedDate='<%# Eval("Date") %>'>
         <Calendar ID="cldrDate" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
           ViewSelectorText="x" runat="server" >
        </Calendar>
        <DateInput ID="diDate" DisplayDateFormat="MM/dd/yyyy" DateFormat="MM/dd/yyyy"  runat="server">
         </DateInput>
         <DatePopupButton ImageUrl="~/App_Themes/images/calendar_ico.png" HoverImageUrl="~/App_Themes/images/calendar_ico.png">
         </DatePopupButton>
       </telerik:RadDatePicker>
        </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="Remark" DataField="Remark" UniqueName="Remark">
        <ItemTemplate>
     <telerik:RadTextBox ID="rtbRemark" runat="server" Text='<%# Eval("Remark") %>' />
     </ItemTemplate>
      </telerik:GridTemplateColumn>
      <telerik:GridButtonColumn HeaderText="Active/Inactive" ButtonType="LinkButton" UniqueName="lnkItemActiveInActive"  ItemStyle-VerticalAlign="Middle" CommandName="ItemStatus">
     </telerik:GridButtonColumn>
    </Columns>
    </MasterTableView>
    </telerik:RadGrid>
</td>
 </tr>
 </table>
 </ItemTemplate>
</asp:Repeater>

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 10 Oct 2011, 11:47 AM
Hello Giri,
 
You can try the following code library approach to access the ItemTemplate control from client side.
Accessing server controls in a grid template on the client.

Thanks,
Princy.
Tags
Grid
Asked by
Hiren
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or