Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Zafrir Ron on Feb 25, 2009 04:17
open dhtmlx forum
Grid setHeader Problem

For dynamic loading of grid I have innitialization section, innitializing the grid
and update section where I set an XML reuest string set new header by
setHeader and "loadXML()".
so only reploading is done without reinitializing.
it looks like the setHeader command is breaking the grid when I try to refresh.
removing this command from the loading section solves the problem.

How can set dynamic header without setHeader.?
Answer posted by dhxSupport on Feb 25, 2009 05:08

setHeader method doesn't allow to change grid's header dinamically. To update header via XML you have to clear it first with method mygrid.clearAll(true). You xml should containg <head> section.

Also you can change header's labels via API using method mygrid.setColumnLabel(c, label, ind) where c - header column index, # label - new label for the cpecified header's column. Can contai img:[imageUrl]Text Label, ind - header row index (default is 0).