This is a migrated thread and some comments may be shown as answers.

Hide DetailItemTemplate on Export

1 Answer 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Glenn
Top achievements
Rank 1
Glenn asked on 29 Nov 2013, 08:01 AM

I am trying to find a solution to exclude the DetailItemTemplate from export to Excel and Word. 



I have tried the following code in the export onclick event and whilst debugging shows that whilst it does change visible to false for each item, the detail still appears in Excel and Word:

For Each item As GridDataItem In RadGrid1.MasterTableView.Items

item.DetailTemplateItemDataCell.Visible = False

Next

Me.RadGrid1.MasterTableView.ExportToExcel()


(Note by default without any additional code Export to CSV or PDF appears to be excluding the DetailItemTemplate)

 

Any idea?



Thanks



Glenn



1 Answer, 1 is accepted

Sort by
0
Glenn
Top achievements
Rank 1
answered on 30 Nov 2013, 03:31 AM
Never mind, it just started working. Not sure why.
Tags
Grid
Asked by
Glenn
Top achievements
Rank 1
Answers by
Glenn
Top achievements
Rank 1
Share this question
or