Hi jqWidget Team,
I am using jqxTreeGrid in jquery model (not in Angular way).
Its working good.
Now in my page, i am providing the refresh button to reload the TreeGrid data.
During this time, we call the REST API and building the treeGrid.
In fact i call the same method, which i used for Initial creation.
I feel, this is not good way to do.
Do you have any recommendations here ?
And is there any way, to directly apply/refresh the latest data on existing TreeGrid.
I believe there should be improvement in performance.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The code looks something similar to below.
function buildTreeGrid(){
var source =
{
datatype: “jsonp”,
datafields: [
{ name: ‘countryName’ },
{ name: ‘name’ },
{ name: ‘population’, type: ‘float’ },
{ name: ‘continentCode’ }
],
url: “http://ws.geonames.org/searchJSON”,
data: {
featureClass: “P”,
style: “full”,
maxRows: 50
},
formatdata: function (data) {
return “my data”;
}
};
var dataAdapter = new $.jqx.dataAdapter(source);
$(“#treeGrid”).jqxTreeGrid(
{
width: 400,
source: dataAdapter,
ready: function () {
$(“#treeGrid”).jqxTreeGrid(‘hideColumn’, ‘name’);
},
columns: [
{ text: ‘Name’, dataField: ‘name’, width: 250 },
{ text: ‘Beverage Type’, dataField: ‘type’, width: 250 },
{ text: ‘Calories’, dataField: ‘calories’, width: 180 },
{ text: ‘Total Fat’, dataField: ‘totalfat’, width: 120 },
{ text: ‘Protein’, dataField: ‘protein’, width: 100}
]
});
}
Regards,
Rao.