jQuery UI Widgets › Forums › Grid › Triggering a method
Tagged: filtering, grid, grid grouping, paging and scrolling, sorting
This topic contains 3 replies, has 2 voices, and was last updated by Peter Stoev 11 years, 1 month ago.
-
AuthorTriggering a method Posts
-
Hi,
I have Method which manipulates the data in an row and convert into different format (for eg 1,4,7,10 as Trend chart). It is working when it is called from loadComplete event and changes the input to requried format(say for example trend chart) in all rows. But when I do pagination or Grouping or sorting or flitering even scrolling that requried format(trend) is changed to normal input ((for eg 1,4,7,10).function ChartTrend() { //Converstion Logic}var dataAdapter = new $.jqx.dataAdapter(source, { downloadComplete: function (data, status, xhr) { }, loadComplete: function () { debugger; ChartTrend(); }});var trendmethod = function (row, columnfield, value, defaulthtml, columnproperties) { return '<div class="trendLine">' + value + '</div>';}$("#jqGrid").jqxGrid( { source: dataAdapter, theme: theme, pageable: true, autoheight: true, sortable: true, enabletooltips: true, groupable: true, filterable: true, groupsexpandedbydefault: true, columns: [ { text: 'Trend', datafield: 'TrendDataString', cellsrenderer: trendmethod, width: 95, }, ], });
Regards,
Gowri.Hi Gowri,
The “cellsrenderer” callback is called when a cell needs to be rendered. If you have enabled grouping, the method will be called only for “leaf” cells, not for the grouping headers which you can customize by using the “groupsrenderer” method. The “cellsrenderer” callback can also be used only for HTML customization. If you wish to add custom CSS Class to a Grid cell, use the “cellclassname” callback function.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks Peter,
could you please share the link for cellClassName callback function and groupRender callback function. One more doubt is that possible to catch all the events in the grid like grouping, filtering, scrolling, etc…
Regards,
Gowri.Hi Gowri,
Here are the requested links: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/gridcellclass.htm?arctic and http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/groupsrenderer.htm?arctic
The Grid’s API documentation can be found here: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-api.htm
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.