Last Updated: 03 Nov 2014 10:09 by Elena
Created on: 02 Jul 2013 23:41
Category: Grid
Type: Bug Report
Column indexing incorrect when RowIndicator is included - Client API
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" "">

<html xmlns="">
<head runat="server">

        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);

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <telerik:radgrid runat="server" ID="grdCompany" AutoGenerateColumns="False" CellPadding="0"  CellSpacing="0">
                <MasterTableView gridlines="Both" hierarchyloadmode="ServerBind" allowautomaticupdates="True" DataKeyNames="Id">
                        <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>
                    <ClientEvents OnRowDblClick="grdCompany_DblClick" />

1 comment
Posted on: 03 Nov 2014 10:09
The item is duplicated of the "FIX: When GridRowIndicatorColumn is used the drag to group is not working properly."