jQWidgets Forums
jQuery UI Widgets › Forums › Grid › cellclassname, refresh color
Tagged: cellclassname, grid
This topic contains 1 reply, has 1 voice, and was last updated by antrax13 8 years, 2 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
-
Author
-
Hi I have a grid loaded on click.
Everything works fine except grid is not refreshing cell color.
Cell is always “yellow” how can I refresh the color aswell?
My code:
// data source var anomalyDashboardSource = { datatype: "json", datafields : [ { name: 'id'}, { name: 'classification'} ], method: 'GET', cache: false, async: true }; var cellclass = function (row, columnfield, value) { alert(row+' - '+columnfield+'- '+value); if (value == "red") { return 'red'; }else if (value == "orange") { return 'orange'; } else return 'yellow'; }; var anomalyDashboardDataAdapter = new $.jqx.dataAdapter(anomalyDashboardSource); $("#jqxGridRedAnomalies").jqxGrid({ width: '100%', source: anomalyDashboardDataAdapter, pageable: true, pagesize: 10, pagesizeoptions: ['10'], autoheight: true, sortable: true, altrows: true, enabletooltips: true, columnsresize: true, columnsreorder: true, columns: [ { text: 'id', datafield: 'id', columntype: 'textbox', hidden: true}, { text: 'Classification', datafield: 'classification',cellclassname: cellclass, columntype: 'textbox', hidden: false} ] }); function loadAnomalies(system,priority){ // reload grid var data = '?systemnumber='+system+'&priority='+priority; anomalyDashboardSource.url = 'controllers/dashboard_getAnomalies.php'+data; anomalyDashboardDataAdapter.dataBind(); $("#jqxGridRedAnomalies").jqxGrid("updatebounddata"); }
Any idea how to refresh not just data but also cellclassname?
this actually works but I am just being stupid
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.