Categories | Question details Back To List | ||
Select what columns go in the csv exportation I used the fuction for the csv/excel grid exportation, but in my grid I use link columns, and in the csv file the link appears like it can be viewed in th xml It's there any method to choose what columns are exported o to parse the grid in the exportation? and also the headers can be exported? Thanks Answer posted by dhxSupport on May 27, 2009 01:53 >>I used the fuction for the csv/excel grid exportation, but in my grid I use link columns, and in the csv file the link appears like it can be viewed in th xml Serialization was designed to allow you to load grid again from the serialized xml or csv string. If link columns will not serialized like it viewed in the xml you will not able to load grid from the serialized string again. >>It's there any method to choose what columns are exported o to parse the grid in the exportation? You can use method setSerializableColumns(list) where list - list of true/false values separated by comma, if list empty then all fields will be serialized >>and also the headers can be exported? In case of csv serialization you can use method enableCSVHeader(mode) where mode - true/false. In case of xml serialization you can use method setSerializationLevel(userData, fullXML, config, changedAttr, onlyChanged, asCDAT) where # userData - enable/disable user data serialization # fullXML - enable/disable full XML serialization (selection state) # config - serialize grid configuration # changedAttr - include changed attribute # onlyChanged - include only Changed rows in result XML # asCDATA - output cell values as CDATA sections (prevent invalid XML) Answer posted on May 27, 2009 14:25 Thanks for the answer, but now I have this problems: I've add this to the grid mygrid.setSerializableColumns(false,true,true,true,true,true,true); but the column marqued with the false statment still appearing in the csv file, mygrid.enableCSVHeader(true); in the csv file, the row id is also showed, so the header are moved, cause that extra column, is there any way to move the header a little? Thanks! Answer posted by dhxSupport on May 28, 2009 05:40 >>but the column marqued with the false statment still appearing in the csv file, setSerializableColumns(list) has parameter - string which is a list of true/false values: mygrid.setSerializableColumns("false,true,true,true,true,true,true"); >>in the csv file, the row id is also showed, so the header are moved, cause that extra column, is there any way to move the header a little Add following command to grid initialization: mygrid.enableCSVAutoID(true); |