Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jul 15, 2008 02:34
open dhtmlx forum
To get the values of the resized columns

Hi,
I'm using dhtmlxgrid v 1.6
I have a question
How can we get the values for the width of the column as soon as i change the column size(Dynamically)?
i.e. as soon as i change the size of the column the width of the column should be displayed in the alert window.
Please guide me in this.
Answer posted by Support on Jul 15, 2008 03:16
var column; var size;
grid.attachEvent("onResize",function(c,s){
    column=c; size=s;
    return true;  
});
grid.attachEvent("onResizeEnd",function(){
    alert("Column "+column+" was resized, new size = "+size);
    return true;
})
Answer posted on Jul 28, 2008 05:06

Hi,

Thanks for the reply.

Is it possible to get and set the modified widths of the grid through XML?

Answer posted by Support on Jul 28, 2008 05:53
The width of column can be specified as part of grid configuration in XML
    http://dhtmlx.com/docs/products/dhtmlxGrid/doc/guide.html#grid_confxml

When grid serialized back to XML, such settings will be included in header section of XML

    grid.setSerializationLevel(false,false,true);
    var xml = grid.serialize();
Answer posted on Jul 29, 2008 03:30

hi,

i want the changed column size to be updated in the table, so that when i close the window and then if i open again i want the grid to open with the modified values. I'm unable to get the value for saving purpose. How can i get the grid work according to the above mentioned functionality?

Answer posted by Support on Jul 29, 2008 05:43
>> I'm unable to get the value for saving purpose.
You can save column width to cookies and restore them after page reloading.
    http://dhtmlx.com/docs/products/dhtmlxGrid/samples/rows_columns_manipulations/pro_column_states_save.html?un=1217336625000