I have a Parent grid that is editable with multiple controls in its <FormTemplate> and one of them is another Grid that is also editable. I cant seem to find the control inside the child Grid when it is in edit mode with JavaScript.
So i have a button that sets the date to another control in the child Grid. Function runs but cant even find the child Grid, therefore its controls.
the variable myGrid is always NULL.Once it is found can i find the controls the same way?
code for Grids - need to find that RadDateTimePickerTodayDate control! Thanks!!!
So i have a button that sets the date to another control in the child Grid. Function runs but cant even find the child Grid, therefore its controls.
function OnClientClickedSetDateToday(sender, args) {var myGrid = $find('<%= RadGridMaster.ClientID%>').get_masterTableView().get_editItems()[0].findControl('RadGridSub');}the variable myGrid is always NULL.Once it is found can i find the controls the same way?
function OnClientClickedSetDateToday(sender, args) {// find the RadDateTimePicker inside the Child grid in the EditFormTemplate of the Parent Grid EditFormTemplatevar myRadDateTimePicker = $find('<%= RadGridMaster.ClientID%>').get_masterTableView().get_editItems()[0].findControl('RadGridSub').get_masterTableView().get_editItems()[0].findControl
('RadDateTimePickerTodayDate');// need to set current datevar myTodayDate = new Date();myRadDateTimePicker.set_selectedDate(myTodayDate);}code for Grids - need to find that RadDateTimePickerTodayDate control! Thanks!!!
<telerik:RadGrid runat="server" ID="RadGridMaster" Height="100%" Width="97%" AllowMultiRowSelection="false" AutoGenerateColumns="True" ShowHeader="False" AllowAutomaticUpdates="false" AllowAutomaticInserts="false"> <MasterTableView CommandItemDisplay="Top" NoMasterRecordsTex......<%-- Edit form parent template --%> <EditFormSettings EditFormType="Template"> ......... <telerik:RadGrid runat="server" ID="RadGridSub"> <MasterTableView CommandItemDisplay="Top" NoMasterRecordsT.......
<EditFormSettings EditFormType="Template" ColumnNumber="2">
<FormTemplate>
.........
<telerik:RadButton runat="server" ID="RadButtonSetDateToday" OnClientClicked="OnClientClickedSetDateToday"....
<telerik:RadDateTimePicker runat="server" ID="RadDateTimePickerTodayDate" MinDate="1/1/190...