Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coloring Grid Rows
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01431080
Message ID:
01431551
Views:
38
>Use the DataGridView's RowsDefaultCellStyle and / or AlternatingRowsDefaultCellStyle properties.
>
>>What's involved in changing the color of the rows of data in a DataGridView?

Once you get a GridView set up they way you want it, create a theme in the App_Themes folder and create a skin. Just set the skin property on the gridview. That way if you ever want to change it you only have to change it once in the skin file and it will apply to all your gridviews.

GridViewDefault.skin
<mm:mmGridView runat="server" 
        ForeColor="#333333" GridLines="None" IsPostBack="False" SecuritySetup="True"
        UserFieldName="" SkinID="GridViewDefault" CellPadding = 2>
        <FooterStyle CssClass="GridView_Header"  />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle CssClass="GridView_Header" ForeColor="Black" Font-Bold="False"/>
        <EditRowStyle BackColor="#FFEEBB" />
        <RowStyle BackColor="#F1F1F1" ForeColor="#333333" Font-Size="small"/>
        <AlternatingRowStyle BackColor="#FFFFFF" ForeColor="#284775"  />
        <SelectedRowStyle BackColor="#C0C0C0" Font-Bold="False" ForeColor="#333333" />
    </mm:mmGridView>
Regards,

E.R. Gilmore
Previous
Reply
Map
View

Click here to load this message in the networking platform