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

Find Control inside RadGrid EditForm template

1 Answer 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
raju
Top achievements
Rank 1
raju asked on 28 Jun 2010, 08:22 PM
Hi Guys, i need your help to resolve this plzzzzz helpppp mmmeeeee
when student check the button it should empty the DatePicker value to null.... i should do on client SIde.....
In the Below code trying find RadDatePicker(ID:studentJoiningDate)  on client Side. I  am unable to find out the control
Plzzzzzzz help me guyz...........
Thanks,
Jon

<

 

div>

 

 

 

 

 

<telerik:RadGrid

 

 

 

ID="RadGrid1"

 

 

 

runat="server"

 

 

 

AllowSorting="True"

 

 

 

AutoGenerateColumns="False"

 

 

 

AllowFilteringByColumn="True"

 

 

 

ShowFooter="True"

 

 

 

ShowGroupPanel="false"

 

 

 

Width="960px"

 

 

 

BorderColor="#999999"

 

 

 

BorderWidth="1px"

 

 

 

GridLines="None"

 

 

 

AllowPaging="true"

 

 

 

PageSize="20"

 

 

 

Height="800px"

 

 

 

onneeddatasource="RadGrid1_NeedDataSource"

 

 

 

onitemdatabound="RadGrid1_ItemDataBound"

 

 

 

onitemcommand="RadGrid1_ItemCommand"

 

 

 

Skin="Outlook"

 

 

 

>

 

 

 

<FooterStyle BorderStyle="None" />

 

 

 

<MasterTableView EditMode="PopUp" ShowGroupFooter="true" DataKeyNames="Student_id" HierarchyDefaultExpanded="true"

 

 

 

CommandItemDisplay="TopAndBottom" >

 

 

 

<NoRecordsTemplate>

 

 

 

<div style="padding: 10px; font-weight: bold; font-size: 14px; color: #ff0000; text-align: center">There are no Students available</div>

 

 

 

</NoRecordsTemplate>

 

 

 

<Columns>

 

 

 

<telerik:GridEditCommandColumn>

 

 

 

<HeaderStyle Width="50px" />

 

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridBoundColumn

 

 

 

DataField="Student_id"

 

 

 

HeaderText="Student ID"

 

 

 

UniqueName="Student_id"

 

 

 

SortExpression="Student_id"

 

 

 

AutoPostBackOnFilter="true"

 

 

 

CurrentFilterFunction="StartsWith"

 

 

 

ShowFilterIcon="false">

 

 

 

<HeaderStyle Width="100px"/>

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn

 

 

 

HeaderText="Name"

 

 

 

UniqueName="Name"

 

 

 

DataField="name"

 

 

 

SortExpression="Name"

 

 

 

AutoPostBackOnFilter="true"

 

 

 

CurrentFilterFunction="StartsWith"

 

 

 

ShowFilterIcon="false">

 

 

 

<HeaderStyle Width="200px"/>

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn

 

 

 

HeaderText="Size"

 

 

 

DataField="size"

 

 

 

UniqueName="size"

 

 

 

SortExpression="size"

 

 

 

AutoPostBackOnFilter="true"

 

 

 

CurrentFilterFunction="StartsWith"

 

 

 

ShowFilterIcon="false">

 

 

 

<HeaderStyle Width="100px"/>

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

<EditFormSettings

 

 

 

EditFormType="Template"

 

 

 

InsertCaption="Add new Item"

 

 

 

CaptionFormatString="Edit Student_id:{0}"

 

 

 

CaptionDataField="Student_id"

 

 

 

FormStyle-Height="700px"

 

 

 

FormStyle-Width="700px"

 

 

 

PopUpSettings-Modal="true"

 

 

 

>

 

<

 

 

EditColumn UniqueName="EditCommandColumn1"></EditColumn>

 

<

 

 

FormStyle Height="700px" Width="700px"></FormStyle>

 

 

 

<FormTemplate>

 

 

 

 

<table id="Table2" cellspacing="1" cellpadding="1" width="400" border="0">

 

 

 

<tr>

 

 

 

<td>

 

 

 

</td>

 

 

 

<td>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

Student ID:

 

</td>

 

 

 

<td>

 

 

 

<asp:Label ID="StudentIDLabel" Text='<%# Bind("Student_id") %>' runat="server" Width="200px">

 

 

 

</asp:Label>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

Name:

 

</td>

 

 

 

<td>

 

 

 

<asp:TextBox ID="StudentNameTextBox" runat="server" Text='<%#Bind("name") %>' Width="200px">

 

 

 

</asp:TextBox>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>Size:</td>

 

 

 

<td>

 

 

 

<asp:TextBox ID="StudentSizeTB" runat="server" Text='<%#Bind("size") %>' Width="200px">

 

 

 

</asp:TextBox>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>Joining Date:</td>

 

 

 

<td>

 

 

 

<telerik:RadDatePicker ID="studentJoiningDate" runat="server" Width="200px">

 

 

 

</telerik:RadDatePicker>

 

 

 

<asp:CheckBox ID="studentChk" runat="server" OnClick="chkfunction();" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

<table style="width: 100%">

 

 

 

<tr>

 

 

 

<td align="right" colspan="2">

 

 

 

<asp:Button ID="Button3" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

 

runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>

 

 

 

</asp:Button>&nbsp;

 

 

 

<asp:Button ID="Button4" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">

 

 

 

</asp:Button>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</FormTemplate>

 

 

 

<PopUpSettings Modal="True"></PopUpSettings>

 

 

 

</EditFormSettings>

 

 

 

</MasterTableView>

 

 

 

 

<ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">

 

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="1" />

 

 

 

<ClientEvents/>

 

 

 

</ClientSettings>

 

 

 

<FilterMenu BorderStyle="None"></FilterMenu>

 

 

 

</telerik:RadGrid>

 

 

 

 

</div>

 

 

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 01 Jul 2010, 07:52 AM
Hi raju,

Try pasting your code using the code-formatter tool of the ticket editor to make it readable.

Regards,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
raju
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or