I have to rebind my grid with new datasource( JSON) which has different columns ( but # of columns are fixed) every time.
For example on button click event I call below function and pass data with new node data and header text
function bindTable(nodeData, header) {
$("#grid").igGrid({
dataSource: nodeData, //JSON Array defined above
columns: header
});
}
Data is getting changed but column headers are not getting change , how I can do this in Iggrid to have the header values updated along with the data in the grid?
Hi Tammy,
Thank you for writing in our community forums. I looked at the issue that you have and I prepared a sample that resolves it. The basic idea is to use renderMultiColumnHeader API method of the grid to change the columns collection. This method is created to change Multi-Column Headers but in your case it works just fine and you don’t need to recreate the grid every time you change the data source. You can see the full code in the sample that I attached.
Please let me know if this works for you and if you need any further assistance.
Kind regards,
Petko Zhekov
Software Engineer
Is there a similar API for igHierarchicalGrid? My requirement is to rebind and re-rendered the whole HierarchicalGrid with ajax data.
Hi Tammy!
The approach you can take for this is discussed on the following forum post: http://es.infragistics.com/community/forums/p/68376/415493.aspx
Let me know if you need any additional assistance on this.
Thanks!