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

Export hidden GridBoundColumns

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 25 Nov 2008, 10:41 PM
Hey there,

I have several GridBoundColumns that are set to hidden.  They only display in the edit form view, but I would like them to show up when I export to Excel, PDF and Word.  I've tried the following, but I'm not even sure if it's the right approach:

foreach (GridColumn gc in mlRadGrid.MasterTableView.Columns) 
     gc.Visible = true

Any help would be much appreciated!

-Derek

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Nov 2008, 03:52 AM
Hi Derek,

Try the following approach to export hidden columns.

CS:
 protected void Button1_Click(object sender, EventArgs e) 
    { 
        RadGrid1.MasterTableView.GetColumn("ProductName").Visible = true
        RadGrid1.MasterTableView.Rebind(); 
        RadGrid1.ExportSettings.OpenInNewWindow = true
        RadGrid1.MasterTableView.ExportToWord(); 
    } 



Thanks
Shinu.
Tags
Grid
Asked by
Derek
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or