Hi there,
I have a issue where I need to roll through each row in a grid (ClientSide). I need to find a check box control that has been added to a specific column during the grids ItemDataBound event.
The grid looks like this:
That last column "CheckBoxEmailColumn" gets a server side CheckBox added to it during the ItemDataBound event:
I want to go through each data row, find that CheckBox and see if it's checked or not. Something like this:
Any help would be appreciated.
Thank you,
Tad
I have a issue where I need to roll through each row in a grid (ClientSide). I need to find a check box control that has been added to a specific column during the grids ItemDataBound event.
The grid looks like this:
<
Columns
>
<
telerik:GridTemplateColumn
HeaderText
=
"Feature Name"
UniqueName
=
"FeatureNameTemplateColumn"
ReadOnly
=
"false"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblFeatureName"
Text='<%# Bind("FeaturePropertyName") %>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"PD"
UniqueName
=
"PackageDescriptionEdit"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"Feature Value"
UniqueName
=
"FreeTextDataValueEdit"
></
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Modified"
UniqueName
=
"LastModifiedTemplateColumn"
ReadOnly
=
"true"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblLastModified"
Font-Size
=
"8pt"
Text='<%# Bind("LastModifiedBy") %>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"CheckBoxEmailColumn"
></
telerik:GridBoundColumn
>
</
Columns
>
That last column "CheckBoxEmailColumn" gets a server side CheckBox added to it during the ItemDataBound event:
var chk = new CheckBox {Checked = false, TabIndex = 5000, ID = "chkBoxEmail"};
eItem["CheckBoxEmailColumn"].Controls.Add(chk);
I want to go through each data row, find that CheckBox and see if it's checked or not. Something like this:
function
CallEmailWindow() {
var
productid = $telerik.$(
'#<%= hfProductID.ClientID %>'
).val();
var
masterTable = $find(
"<%= rgvProductDetail.ClientID %>"
).get_masterTableView();
var
items = masterTable.get_dataItems();
var
num = masterTable.get_dataItems().length;
for
(
var
index = 0; index < num; index++) {
var
control = masterTable.get_dataItem()[index].findControl(
"chkBoxEmail"
);
}
}
Any help would be appreciated.
Thank you,
Tad