Hi!
How to choose radcombobox1 and then clear radcombobox 2 For radcombobox in radgrid
- I try to put javascript, but it does not work, and then find that find combobox2 not found.
- Here is my jquery ajax function:
function OnClientSelectedIndexChanged(sender, eventArgs) {
var SenderId = sender.get_id();
var RadTextBox1 = $("#" + SenderId).get(0);
var RadTextBox2 = $("#" + SenderId.replace("combo_Examtion", "combo_ExamtionCount")).get(0);
//// for telerik /radcontrols
var RadTextBox2 = $telerik.findTextBox(SenderId.replace("combo_Examtion", "combo_ExamtionCount"));
}
<
telerik:GridTemplateColumn
HeaderText
=
"ข้อสอบ"
HeaderStyle-Width
=
"200px"
UniqueName
=
"NameExaminationID"
DataField
=
"NameExaminationID"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblNameExaminationID"
Text='<%# Eval("NameExamination")%>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
div
style
=
"width: 190px; float: left;"
>
<
telerik:RadComboBox
ID
=
"Radcombobox1"
runat
=
"server"
AllowCustomText
=
"True"
Filter
=
"Contains"
OnClientSelectedIndexChanged
=
"OnClientSelectedIndexChanged"
OnItemsRequested
=
"combo_Examtion_ItemsRequested"
Skin
=
"Vista"
DropDownWidth
=
"250px"
Width
=
"155px"
Height
=
"150px"
EnableVirtualScrolling
=
"true"
HighlightTemplatedItems
=
"true"
EnableLoadOnDemand
=
"True"
OnClientDropDownOpened
=
"MyClientBlur"
>
<
ItemTemplate
>
<
table
style
=
"width: 200px;"
>
<
tr
>
<
td
style
=
"width: 150px;"
>
<%# DataBinder.Eval(Container.DataItem, "NameExamination")%>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
div
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"ชุดที่"
HeaderStyle-Width
=
"80px"
UniqueName
=
"Examination_No"
DataField
=
"Examination_No"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblExamination_No"
Text='<%# Eval("Examination_No")%>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
div
style
=
"width: 190px; float: left;"
>
<
telerik:RadComboBox
ID
=
"Radcombobox2"
runat
=
"server"
AllowCustomText
=
"True"
Filter
=
"Contains"
OnItemsRequested
=
"combo_ExamtionCount_ItemsRequested"
Skin
=
"Vista"
DropDownWidth
=
"100px"
Width
=
"70px"
Height
=
"150px"
EnableVirtualScrolling
=
"true"
HighlightTemplatedItems
=
"true"
EnableLoadOnDemand
=
"True"
OnClientDropDownOpened
=
"MyClientBlur"
>
<
ItemTemplate
>
<
table
style
=
"width: 50px;"
>
<
tr
>
<
td
style
=
"width: 50px;"
>
<%# DataBinder.Eval(Container.DataItem, "Examination_No")%>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
div
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>