Dear all
I have a jqxGrid with some columns and some cellsrenderer functions.
Typically, I have some hidden columns with some extra infos, which I use in the cellsrenderer to generate the text (e.g. concat two datafields) / color / icon of my visible columns. Usually, I can use the ‘row’ index to access my records and access the hidden column:
var myCellsRenderer = function (row, columnfield, value, defaulthtml, columnproperties) {
return defaulthtml.replace(value, $scope.myrecords[row].firstName + " " + $scope.myrecords[row].lastName);
}
$scope.myrecords is saved in the ‘beforeLoadComplete’ callback of the dataAdapter of my grid.
The problem with this approach is in virtual scrolling mode: Since the ‘row’ in the cellsrenderer seems to be the relative index (always 0 on top of grid) and the records returned in the beforeLoadComplete have the absolut index (e.g. on line 100000 of the grid, I have $scope.myrecords[100000] defined, and $scope.myrecords[0] is undefined), I do not know how to get the full row context.
Does anybody know how to deal with that? Thanks in advance!
– badera