views:

58

answers:

1

Hi,

I have an aspxgridview which groups first by year and then by month. Basically my query returns Month and year as seperate columns. Now if I return month as "January or February" then ASPxGridview does not know how to sort this.

I heard of custom sorting, but even then if I return month column as a number and use dataitem template to convert it to a name...it works but then when exporting it only exports the number not the dataitemtemplate.

I am really confused, can anyone help me here.

Thanks

+1  A: 

Hi,

First, the ASPxGridViewExporter cannot export data shown in a template container. This is because a developer can show any control inside it and we cannot determine which data is shown there. So, if you need to show a custom text when this column data is exported, use the ASPxGridViewExporter's RenderBrick event. However, the better solution is to create an unbound column and pass data to this column cells using the ASPxGridView's CustomUnboundColumnData event handler. In this case, you should refuse from using DataItemTemplate.

DevExpress Team