PDA

View Full Version : [OPEN] [#48] GridPanel - Feature Request



adelaney
Aug 30, 2012, 6:12 PM
I am not totally sure if this is the correct avenue for this topic, if not, please feel free to redirect me.

I would love to have built-in functionality available to export a grid panel as it is displayed, not simply the store which supports the grid. The reason I ask for this is because the store has no knowledge of grouping, sorting, filtering, custom rendering templates, etc.

Thanks in advance for consideration of this feature.

Daniil
Aug 30, 2012, 7:20 PM
Hi,


The reason I ask for this is because the store has no knowledge of grouping, sorting, filtering, custom rendering templates, etc.


Well, actually, the grouping, sorting, filtering features are the Store ones. So, it does know about them.

Regarding "custom rendering templates". Do you mean Renderer and TemplateColumn?

I think you should use the GridPanel getRowsValues method to retrieve a grid data to export.

// config :
// - selectedOnly
// - visibleOnly
// - dirtyCellsOnly
// - dirtyRowsOnly
// - currentPageOnly
// - excludeId
// - filterRecord - function (record) - return false to exclude the record
// - filterField - function (record, fieldName, value) - return false to exclude the field for particular record
getRowsValues : function (config) { ... }

adelaney
Aug 30, 2012, 10:29 PM
Danill,

Yes, in my previous post, I was referring to the "Renderer" and "TemplateColumn." Also, by "not know..," I was referring to client changes like moving columns, sorting the grid, filter, etc. at the client. Maybe the store does know about these updates, but I haven't seen that to be true as I have been trying some of the export samples. Of course, maybe I am implementing it incorrectly. However, I will try the "getRowsValues" to see if that will satisfy the need.

Thanks for the info.

adelaney
Aug 30, 2012, 11:12 PM
Danill,

I tried the "getRowsValues," and unfortunatley, that isn't enough. For example, I have a grid which uses the row editing plugin. When in read mode, the employee's name is presented and when in edit mode, a drop-down is presented with a list of employees. The conversion from read to edit, involves a custom renderer, and when using the getRowsValues, I get the employeeID values. For the purpose of exporting, that means nothing to the user. However, I did see that it does get accurately get data sorted information, but fails to get data in the corresponding order if columns are reordered. I have spoken with some colleagues and they have mentioned that that actually loop through the DOM to get the "on-screen" version of the grid's display. Personally, I am not a fan of that, so I am back to my original request for an export option of the grid exactly as it is presented to the screen (or altered at the client).

Daniil
Aug 31, 2012, 6:51 AM
I have a grid which uses the row editing plugin. When in read mode, the employee's name is presented and when in edit mode, a drop-down is presented with a list of employees. The conversion from read to edit, involves a custom renderer, and when using the getRowsValues, I get the employeeID values. For the purpose of exporting, that means nothing to the user.

I thought the getRowsValues should call a Renderer. Now I see it doesn't call it. We will consider a possibility to add such option.


but fails to get data in the corresponding order if columns are reordered.

We will consider it as well.

Daniil
Aug 31, 2012, 3:40 PM
I thought the getRowsValues should call a Renderer. Now I see it doesn't call it. We will consider a possibility to add such option.

Well, actually rendered HTML in the cells can be too various. It complicates implementing such feature. Though we will keep an eye on it.




but fails to get data in the corresponding order if columns are reordered.

We will consider it as well.


We decided to implement it. I will notify you then it will become available.

Baidaly
Nov 17, 2012, 2:20 AM
Opened an Issue to track this defect, see

https://github.com/extnet/Ext.NET/issues/48