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. Image for the cookie policy date

ExportExcelAction GridPropertiesModel Equivalent

I need to know how to accomplish the mapping of additional parameters to the expel export in the GridProperties model.

This is what works in the GridBuilder
.Mappers(map =>
                map.ExportExcelAction("ExportOrderDetails", new { account = Model.Order.CustomerNumber, orderNumber = Model.Order.OrderNumber });

            .ToolBar(tools =>

What is the equivalent of the above using the gridpropertiesmodel?

ToolbarSettings toolbar = new ToolbarSettings();
            toolbar.Enable = true;
            toolbar.Items.Add(new ToolbarOptions() { ItemType = GridToolBarItems.ExcelExport, Caption = "ExportOrderDetails", Mapper =  ?????});
            gridModel.ToolBar = toolbar;

1 Reply

AS Alan Sangeeth S Syncfusion Team March 27, 2014 06:23 AM UTC

Hi Thomas,

Thanks for using Syncfusion Products.

We are glad to let you know that your requirement can be achieved by using clientside event “OnToolbarClickEvent”. In that event handler we can be bind values to ExcelToExport action. Please refer the following code snippets.

Code Snippet:


public ActionResult GridFeatures()


ClientSideEvents =
new ClientSideEvents() { OnToolbarClickEvent = "ToolbarClick" },


public ActionResult ExportToExcel(string CustomerID)


var data = new GridSample1.Models.StudentDataContext().Student.Take(100).ToList();


return data.GridExportToExcel<Student>("GridExcel.xlsx", ExcelVersion.Excel2007);


function ToolbarClick(sender, args) {



For your convenience we have created a sample and the same can be downloaded from below link.



Please let us know if you have any queries.

Alan Sangeeth S

Live Chat Icon For mobile
Up arrow icon