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

Call Export to Excel from button outside the grid?

2 Answers 228 Views
Grid
This is a migrated thread and some comments may be shown as answers.
scott
Top achievements
Rank 1
scott asked on 16 Jul 2012, 06:28 PM
I have a client asking to have an Export Excel button appear outside of the RadGrid. Is it possible in this scenerio for the button to call the RadGrid's built-in functionality of exporting to Excel? If so, how can I achieve this?

Thanks,

-Scott

2 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Jul 2012, 07:10 PM
Hello,

        protected void Button1_Click(object sender, EventArgs e)
        {
            RadGrid1.MasterTableView.ExportToExcel();
            RadGrid1.Rebind();
 
}


Thanks,
Jayesh Goyani
0
scott
Top achievements
Rank 1
answered on 16 Jul 2012, 08:29 PM
Perfect! thanks so much, Jayesh!

-Scott
Tags
Grid
Asked by
scott
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
scott
Top achievements
Rank 1
Share this question
or