when accessing column values in the client API (javascript),
if the row indicator column is included the column indexes are off by 1.
Behaving as if the row indicator column is not accounted for in the index scheme.
without this (additional) row, indexing is correct.
* I was just informed the indexing is also affected on the server side as well.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TelerikColMismatch.Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script>
function grdCompany_DblClick(sender, eventArgs) {
var masterTable = sender.get_masterTableView();
var row = masterTable.get_dataItems();
var selRow = row[eventArgs.get_itemIndexHierarchical()];
alert("grdColId : " + (masterTable.getCellByColumnUniqueName(selRow, "grdColId")).innerHTML);
alert("grdColFirstName : " + (masterTable.getCellByColumnUniqueName(selRow, "grdColFirstName")).innerHTML);
alert("grdColLastName : " + (masterTable.getCellByColumnUniqueName(selRow, "grdColLastName")).innerHTML);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:radgrid runat="server" ID="grdCompany" AutoGenerateColumns="False" CellPadding="0" CellSpacing="0">
<MasterTableView gridlines="Both" hierarchyloadmode="ServerBind" allowautomaticupdates="True" DataKeyNames="Id">
<Columns>
<telerik:GridRowIndicatorColumn FilterControlAltText="Filter RowIndicator column" UniqueName="Id" Resizable="False"></telerik:GridRowIndicatorColumn>
<telerik:GridBoundColumn DataField="Id" HeaderText="ID" UniqueName="grdColId" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" UniqueName="grdColFirstName" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" UniqueName="grdColLastName"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<ClientEvents OnRowDblClick="grdCompany_DblClick" />
</ClientSettings>
</telerik:radgrid>
</div>
</form>
</body>
</html>