I am going to be displaying data in "pivoted" mode in the grid, and the TH data-field will contain an id from the database; for example:
Date..............Mary...............Fred...............Mike
1/1/2013........17.....................19...................22
for "Mike" col-header it might be data-field="145998452".
Is there any built-in function in the Kendo library that returns the TH data-field for the column of a clicked-on cell, taking into account hidden columns to the left? If there are invisible columns to the left of the clicked-on cell, the index/cellindex are off by the invisible columns count (to the left of the clicked cell).
EDIT: This is a byproduct of the Kendo design that puts the header and the table-body each into separate tables, and the table-body-table doesn't contain the columns if they're marked hidden (display:none) in the header-table. Kendo header-table has style="display:none" when the grid column's configuration has hidden:true.
<th role="columnheader" data-field="eeid" style="display: none;" class="k-header" data-role="sortable"><a class="k-link" href="#" style="">eeid</a></th>
Date..............Mary...............Fred...............Mike
1/1/2013........17.....................19...................22
for "Mike" col-header it might be data-field="145998452".
Is there any built-in function in the Kendo library that returns the TH data-field for the column of a clicked-on cell, taking into account hidden columns to the left? If there are invisible columns to the left of the clicked-on cell, the index/cellindex are off by the invisible columns count (to the left of the clicked cell).
EDIT: This is a byproduct of the Kendo design that puts the header and the table-body each into separate tables, and the table-body-table doesn't contain the columns if they're marked hidden (display:none) in the header-table. Kendo header-table has style="display:none" when the grid column's configuration has hidden:true.
<th role="columnheader" data-field="eeid" style="display: none;" class="k-header" data-role="sortable"><a class="k-link" href="#" style="">eeid</a></th>
$(grid.tbody).on('click',"> tr:not(.k-grouping-row, .k-detail-row, .k-group-footer)", function(e){
var cell = e.target;
var dataInfo = $('thead th').eq(e.target.cellIndex).data('field');
var ix = $(cell).index(),
thData = $('thead th').eq(ix).attr('data-field');