Hello,
I have a radgrid where I added a button in the ItemCreated event for the grid.
<
p
>if (e.Item is GridCommandItem)<
br
> {<
br
> ImageButton b = new ImageButton();<
br
> b.ID = "Export";<
br
> b.ImageUrl = "images/excel.png";</
p
><
p
>b.CommandName = "Export";</
p
><
p
>e.Item.Controls[0].Controls[1].Controls.Add(b);<
br
> }</
p
>
When the image is clicked it calls the ItemCommand event:
protected void grdInventory_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)<
br
> {<
br
> if (e.CommandName == "Export")<
br
> {<
br
> //do stuff<
br
> }<
br
> }
I want to capture the filters or grouping for that grid and export them to excel in that event. I'd also like to ignore the paging. I know there is a default exportToExcel button for these grids, but I need to export to a template. Therefore, I want to write custom code in the ItemCommand event. Unless there is something built into radgrid that will allow me to export the results to a predefined template?
Thanks!