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

[Solved] Export with dropdowns

2 Answers 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rajesh Ramanathan
Top achievements
Rank 1
Rajesh Ramanathan asked on 18 May 2011, 06:36 AM
Hi,

In my scenario, data displays in grid on the basis of values selected in couple of dropdowns and then I need to export the data in excel.

I used "Custom Toolbar Template" to get the data in grid. But I am not able to incorporate both(dropdown and export to excel) in grid at a time.

.ToolBar(commands => {commands
          .Custom() .Text("Export to CSV") .Action("Action", "Controller"));
commands.Template(() => <text></text>);
})

Can you please suggest a way out for this?

Thanks !!

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 18 May 2011, 07:07 AM
Hello Rajesh Ramanathan,

Indeed you cannot specify both built-in command buttons and template in the ToolBar. In order to achieve the desired functionality you should use only the template and construct the export button similar to the following:

.ToolBar(toolBar => toolBar.Template(
   @<text>
  @Html.ActionLink("Export to CSV","Export","Home", null, new { @class="t-button" })
   @Html.Telerik().ComboBox().Name("ComboBox1")
   </text>))

All the best,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rajesh Ramanathan
Top achievements
Rank 1
answered on 18 May 2011, 09:24 AM
Thanks for the prompt reply Rosen !!

I will try it. 
Tags
Grid
Asked by
Rajesh Ramanathan
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Rajesh Ramanathan
Top achievements
Rank 1
Share this question
or