Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Dec 30, 2009 03:46
open dhtmlx forum
add column in dhtmlxgrid

Hello


thanks for help

i want to add the permanently column in my dhtmlxgrid

As per your mail u can send me the link to add the column and show on example
You can add new column in grid with insertColumn() method. http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:api_method_dhtmlxgridobject_insertcolumn
Example is available here http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/16_rows_columns_manipulations/11_pro_grid_cols.html





i m add the column in my dhtmlxgrid but when i refresh the page it will not show me that column . i want if i add the column then after refresh it will show me . is it possible in dhtmlxgrid if yes please tell me the solutions. or example


waiting for reply


Regards
Suraj
Answer posted by dhxSupport on Dec 30, 2009 09:07
Such functionality is not implemented at the current version of dhtmlxGrid. Structure of Grid is defined while initialization, so if you define 5 column with setHeader() method, add new column and then refresh page, your grid will still has 5 columns, as defined at setHeader method. 
As a work around you can define grid structure in xml with <head> part. After the user adds new column you will need to send additional request to the server side, save new structure of the grid and then after refresh page return xml with additional column.
You can send additional requests to the server side with dhtmlxAjax extension.