HI everyone....
I need some custom THEMES for a grid view....
can anyone send me a link where i can find some sample themes for a gridview or u can just post the code for the theme.....

Regards,
Prasanth

Dani AI

Generated

— building on the MSDN pointer from and the skin idea from , here are ready-to-drop theme pieces you can use immediately. Put the files in a folder like App_Themes/CustomGrid, set Theme="CustomGrid" on the page (or in web.config) and give the GridView SkinID="CustomGrid" to pick up the styles.

<!-- App_Themes/CustomGrid/Grid.skin -->
<asp:GridView runat="server" SkinID="CustomGrid"
    CssClass="gv"
    HeaderStyle-CssClass="gv-header"
    RowStyle-CssClass="gv-row"
    AlternatingRowStyle-CssClass="gv-alt"
    SelectedRowStyle-CssClass="gv-selected"
    PagerStyle-CssClass="gv-pager"
    GridLines="None" />
/* App_Themes/CustomGrid/Style.css */
.gv { width:100%; border-collapse:collapse; font-family: Arial, sans-serif; }
.gv th, .gv-header { background:#2A6EA6; color:#ffffff; padding:8px; text-align:left; }
.gv td { padding:8px; border-bottom:1px solid #e1e1e1; }
.gv .gv-alt { background:#f9f9f9; }
.gv .gv-selected { background:#fff2cc; }
.gv .gv-pager { padding:6px; text-align:right; }
.gv a { color:#2A6EA6; text-decoration:none; }
.gv a:hover { text-decoration:underline; }
<%@ Page Language="C#" Theme="CustomGrid" %>

<asp:GridView ID="GridView1" runat="server" SkinID="CustomGrid"
    DataSourceID="SqlDataSource1" AutoGenerateColumns="False">
    <Columns>
        <asp:BoundField DataField="Name" HeaderText="Name" />
        <asp:BoundField DataField="Email" HeaderText="Email" />
    </Columns>
</asp:GridView>

If the styles do not show up, check these quick items: confirm the folder is App_Themes/CustomGrid; verify the page Theme or web.config theme is set; inspect rendered HTML to ensure class attributes were emitted; use browser dev tools to confirm the CSS file is loaded and that no other stylesheet is overriding it (specificity). If you prefer ready-made palettes and responsive behavior, consider using Bootstrap table classes or the DataTables plugin for many built-in themes and features (Bootstrap tables and DataTables).

Recommended Answers

All 4 Replies

Hi Prasanth,

You may check out the following article:

Regards,

Hey catherine,
thanks for your reply......
but i need some more different themes to use for my application.
can u send me some more links of the pages where i can download some sample themes....


regards,
Prasanth

Hi you just open a style sheet and make a grid view how you want ,make a skin id for grid view just open a grid view property ->stylesheet ->(which name did you save ).shin

Now whenever you ope n a grid view you see your themes

Hey kashtro Raj,

I know how to create a skin and a theme...
i just want some default custom themes which i can use them to my page....

Regards,
Prasanth

Hi you just open a style sheet and make a grid view how you want ,make a skin id for grid view just open a grid view property ->stylesheet ->(which name did you save ).shin

Now whenever you ope n a grid view you see your themes

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.