We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How set the ExportOption for visible into grid?

Thread ID:





104262 Jul 4,2012 12:47 PM UTC Aug 24,2012 04:02 AM UTC ASP.NET MVC (Classic) 2
Tags: Grid
Asked On July 4, 2012 12:47 PM UTC

Hi Want excel export but only visible columns. So How to set ExportOption in grid?


he wei
Replied On July 7, 2012 08:01 PM UTC

I got the similar problem, how to format export data (let's say Excel export)?


Rakesh D [Syncfusion]
Replied On August 24, 2012 04:02 AM UTC

Hi  Jawed, he wei;


Thank you for your interest in Syncfusion products.


To achieve excel export for only visible columns, configure the grid toolbar to enable exporting grid records and Specify the file name, Excel version,ConverterOptionsExt details in the ExportToExcel() method. Please refer to the following code snippet for details.



@{ Html.Syncfusion().Grid<Order>("OrdersGrid")

        .ToolBar(tools => tools.Export(GridToolBarItems.ExcelExport, "Export",           "ExportToExcel"))




public ActionResult ExportToExcel()


            var data = new NorthwindDataContext().Orders.Take(200).ToList();

            return data.GridExportToExcel<Order>("GridExcel.xlsx", ExcelVersion.Excel2007, ConverterOptionsExt.Visible);  //ConverterOptionExt.Visible exports only visible rows



Please let us know if you need further assistance.

Rakesh D


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon