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

Align Grid export buttons on the left.

3 Answers 431 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 19 May 2011, 12:56 PM
Hi,
Whenever we set ShowExportToExcel/Csv/Pdf = true, in the command item settings, the buttons are displayed right corner, in my case top-right corner. I want to place the buttons on the top-left corner of the grid. Is there a way to achieve this?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 May 2011, 01:20 PM
Hello Mark,

One suggestion to customize command item content using CommandItemTemplate. Check the following help documentation which explains more about this.
Command item template.

Thanks,
Princy.
0
Mark
Top achievements
Rank 1
answered on 20 May 2011, 04:40 AM
Hi Princy,
    Thanks for your reply. I was hoping that the inbuilt export buttons could be aligned so that i dont have to handle the events raised by the controls in the command template. Please let me know if there is a way to align the inbuilt export buttons.

Thanks.
0
Daniel
Telerik team
answered on 25 May 2011, 01:56 PM
Hello Mark,

The command item consists of two table cells. I'm afraid there is no easy way to swap the cells or move the buttons from the one cell to another.
The easiest way is to use a template as suggested by Princy. Actually it is quite easy to mimic the built-in buttons so you may find this approach suitable for your needs:
<CommandItemTemplate>
    <table class="rcCommandTable" width="100%">
        <td>
            <asp:Button ID="Button1" runat="server" Text=" " CssClass="rgExpCSV" CommandName="ExportToCSV" />
            <asp:Button ID="Button2" runat="server" Text=" " CssClass="rgExpPDF" CommandName="ExportToPdf" />
        </td>
        <td style="float: right">
            <asp:Button ID="Button3" runat="server" Text=" " CssClass="rgAdd" CommandName="InitInsert" />
        </td>
    </table>
</CommandItemTemplate>

Regards,
Daniel
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mark
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or