I'm having trouble accessing rows and cells in the RadGrid hierarchy. An error is occurring in the line "var cell = MasterTable.getCellByColumnUniqueName (row," Pro ") // cell"
Please help me.
Error: Unhandled exception at line 1452, column 29 in http://localhost:58910/_CC/ControlModel/Graphics.aspx
0x800a01b6 - JavaScript runtime error: Object does not support property or method 'getCellByColumnUniqueName'
<script type="text/javascript">
function LoadValues() {
var grid = $find("<%= RadGrid1.ClientID %>");
var masterTable = grid.get_masterTableView();
// get all rows in the grid
selectedRows = masterTable.get_dataItems();
for (var i = 0; i < selectedRows.length; i++) {
var row = selectedRows[i]; // found the row
for (var j = 0; j < row.get_nestedViews().length; j++) {
var detTable = row.get_nestedViews()[j]; // found the child table
var childRows = detTable.get_dataItems();
for (var k = 0; k < childRows.length; k++) {
var cRow = childRows[k];
var cell = cRow.getCellByColumnUniqueName(row, "ValueScore")
var cellValue = cell.innerHTML;
}
}
}
}
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" ShowStatusBar="true" Skin="Windows7" AllowPaging="True" Width="900px"
OnColumnCreated="RadGrid1_ColumnCreated" OnItemDataBound="RadGrid1_ItemDataBound" OnPreRender="RadGrid1_PreRender"
OnNeedDataSource="RadGrid1_NeedDataSource" AllowMultiRowSelection="true" OnDetailTableDataBind="RadGrid1_DetailTableDataBind">
<GroupingSettings CollapseAllTooltip="Collapse all groups" />
<ClientSettings AllowColumnsReorder="true">
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView DataKeyNames="CodigoRede" ClientDataKeyNames="CodigoRede" Name="Rede">
<DetailTables>
<telerik:GridTableView DataKeyNames="CodigoSubRede" ClientDataKeyNames="CodigoSubRede" Name="SubRede" Width="868px" ShowHeader="true" ShowFooter="false">
<Columns>
<telerik:GridClientSelectColumn UniqueName="SelectColumnNameSubRede"></telerik:GridClientSelectColumn>
<telerik:GridBoundColumn DataField="ValorScoreSubRede" UniqueName="ValueScore" HeaderText="Value Score" HeaderButtonType="TextButton" Visible="true">
<ItemStyle Width="316px" HorizontalAlign="Left" />
</telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<RowIndicatorColumn Visible="false"></RowIndicatorColumn>
<Columns>
<telerik:GridClientSelectColumn UniqueName="SelectColumnName"></telerik:GridClientSelectColumn>
<telerik:GridTemplateColumn HeaderText="Ideal Score">
<ItemStyle HorizontalAlign="Right" Width="330px" />
<ItemTemplate>
<telerik:RadSlider ID="RadSliderValorScoreMinMax" runat="server" Orientation="Horizontal" MinimumValue="0" MaximumValue="99" SmallChange="1" LargeChange="10"
ItemType="Tick" Width="300px" Height="70px" ShowDecreaseHandle="true" ShowIncreaseHandle="true" EnableDragRange="true" EnableServerSideRendering="true"
IsSelectionRangeEnabled="true" AutoPostBack="false" Skin="Windows7" OnClientValueChanged="OnClientValueChanged" DataValueField="">
</telerik:RadSlider>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<br />
<asp:Button ID="buttonClick" runat="server" Text="buttonClick" OnClientClick="buttonClick(); return false;" />