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

export buttons to the left

3 Answers 188 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Carlos asked on 12 Nov 2013, 05:37 PM
Hi all again,

So it the already a way easy to put the export command buttons on the left??
Or is ther a way to do the same with the template ??


Best regards.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Nov 2013, 04:46 AM
Hi Carlos,

You can set the CSS for the ExportToExcel Button as follows:

ASPX:
<MasterTableView CommandItemDisplay="Top" CommandItemSettings-ShowExportToExcelButton="true"
CommandItemSettings-ShowAddNewRecordButton="false">

CSS:
<style type="text/css">
    .rgExpXLS
    {
        float: left !important;
        margin-right: 1100px !important;
    
    .RadGrid_SkinName .rgCommandRow
    {
        color: Transparent !important;
    }
</style>

Another way is you can create your own buttons in CommandItemTemplate as follows :

ASPX:
<CommandItemTemplate>
<table class="rcCommandTable" width="100%">
    <td>
        <asp:Button ID="Button1" runat="server" Text=" " CssClass="rgExpXLS" CommandName="ExportToExcel" />      
    </td>
    <td style="float: right">
        <asp:Button ID="Button3" runat="server" Text=" " CssClass="rgAdd" CommandName="InitInsert" />
    </td>
</table>
</CommandItemTemplate>

Thanks,
Shinu
0
Carlos
Top achievements
Rank 1
answered on 13 Nov 2013, 09:45 AM
Thanks,

But can i use the same icons and same commands that are in the radgrid commands items?

Basicaly can i create button that, are the same i all aspects??
0
Shinu
Top achievements
Rank 2
answered on 14 Nov 2013, 04:16 AM
Hi Carlos,

Yes, you can create Buttons that are same in all aspects. Using the rgExpCSV, rgExpXLS, rgExpPDF CssClasses, you can get the look and feel of Export to CSV, Excel, PDF buttons respectively.
The CommandName such as ExportToCSV, ExportToExcel, ExportToPDF can be given to perform the necessary actions. Please try the above code snippet and let me know if any concern.

Thanks,
Shinu






Tags
Grid
Asked by
Carlos
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Carlos
Top achievements
Rank 1
Share this question
or