Hello!
I have RadGrid which is bound to DataSource, and one of my column (GridCheckBoColumn) is unbound.
I want to to get column value on client side:
But cell.innerHTML return something like this:
<INPUT id=ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl08_ctl00 onclick="check('2');" type=checkbox name=ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl08$ctl00>
I have RadGrid which is bound to DataSource, and one of my column (GridCheckBoColumn) is unbound.
I want to to get column value on client side:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" PageSize="40" CellSpacing="0" DataSourceID="entityDsAutoJoinLog" GridLines="None" Height="100%" OnItemDataBound="RadGrid1_ItemDataBound" AllowAutomaticUpdates="true" ><ClientSettings EnableRowHoverStyle="true" > <Scrolling AllowScroll="true" UseStaticHeaders="true" /></ClientSettings> <MasterTableView AutoGenerateColumns="False" DataKeyNames="CLIENT_CLASS, KEY_VALUE" DataSourceID="entityDsAutoJoinLog" > <Columns> <telerik:GridCheckBoxColumn UniqueName="Parent" />...protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (e.Item is GridDataItem) { CheckBox chkBoxParent = (CheckBox)dataBoundItem["Parent"].Controls[0]; chkBoxParent.Enabled = true; int index = dataBoundItem.ItemIndex; chkBoxParent.Attributes.Add("onclick", "check('" + index + "')"); } }function check(index) { var grid = $find("<%= RadGrid1.ClientID %>"); var MasterTable = grid.get_masterTableView(); var row = MasterTable.get_dataItems()[index]; var cell = MasterTable.getCellByColumnUniqueName(row, "Parent"); if (cell.innerHTML == "True") { alert('TRUE'); } }But cell.innerHTML return something like this:
<INPUT id=ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl08_ctl00 onclick="check('2');" type=checkbox name=ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl08$ctl00>