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

how to show hidden column when you click the built in export images?

0 Answers 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Amy Liu
Top achievements
Rank 1
Amy Liu asked on 28 Aug 2011, 04:52 AM
Hello!
A simple question: I used the image in the grid to export to excel, pdf and word.I want to show hidden column after the grid exported.
How can I put the code in the image click event?

 I know we can put display=true in in the clieck event if there is a button there.
I used GridExporting event and put the display=true code inside. It seem to me that it doesn't work.
 Is it a click event also ? What is the name of the event?

Thanks for any help!

Amy
I used the code. It is working. No help is needed.  Amy

  protected void rg_ItemCommand(object sender, GridCommandEventArgs e)
  {
      if (e.CommandName == RadGrid.ExportToExcelCommandName)
      {
          rg.MasterTableView.GetColumn("x").Visible = false;
          rg.MasterTableView.GetColumn("y").Visible = true;              }
}

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Amy Liu
Top achievements
Rank 1
Share this question
or