PDA

View Full Version : Export to CSV/XLS/XML



Filip Beunens
Mar 31, 2009, 2:39 PM
I used the export grid to CSV, XML, XLS example in my test project with succes but with one minor problem:

The datasource for my store is a .net dataset with the ID field of the product included. In the json reader & grid columns I don read & display the id field but now when I export the grid he is also exporting the ID field and that is what I don't want.

How can I limit the fields that I want to export ? I can't limit the datasource because i need the ID value for later updates.


Filip

Filip Beunens
Apr 01, 2009, 5:14 AM
Hi,


does anyone now's a solution for this ?

Filip

Vladimir
Apr 01, 2009, 6:32 AM
 Hi,

If you export like in Coolite example then you can remove unrequired information from XML before export

Filip Beunens
Apr 01, 2009, 9:55 AM
<P class=MsoNormal style="MARGIN: 0cm 0cm 10pt">My XML programming is not fantastic, is there a fast way to remove a column from the produced XML ?

Edit: 14:09 I've already found this one :) in vb.net :



Dim nodeToBeRemoved As XmlNode = xml.SelectSingleNode"/records/record/id")
nodeToBeRemoved.ParentNode.RemoveChild(nodeToBeRem oved)



But when I want to go further suppose I have a grid where the user has changed the selected columns, sort order &amp; applied a filter, what would be the best approach to readout the visible data.

Filip

Filip Beunens
Apr 01, 2009, 3:13 PM
I'm struggeling with the second question... can't find a solution but this question must be a common one I think ?

I want to go further suppose I have a grid where the user has changed the selected columns, sort order &amp; applied a filter, what would be the best approach to readout the visible data.

Filip

Filip Beunens
Apr 02, 2009, 5:48 AM
Hi,


does no one now's a solution for this ?
Please.....

Filip

plykkegaard
Apr 02, 2009, 8:11 AM
Hmm search the forums? :)

An you'll find this topic
http://forums.ext.net/showthread.php?threadid=7177-4-1.aspx

Hopefully this can help you with your problem

rgds

Vladimir
Apr 02, 2009, 11:25 AM
Hi,

In 0.8 version we added ability save/submit visible data only


grid.save({visibleOnly: true});




Save visible and dirty only
grid.save({visibleOnly: true, dirtyOnly: true});



Submit visible only
grid.submitData(false, true);


Submit has the following prototype
submitData: function(selectedOnly, visibleOnly, dirtyOnly) 



Get rows values
getRowsValues: function(selectedOnly, visibleOnly, dirtyOnly) 

    - return js object with rows values