This project is read-only.

Problems with SkinID in xGrid

Topics: Developer Forum
Apr 13, 2007 at 1:02 PM
Hi guys!!!

I'm trying to use xGrid in my Web Application and I'm trying to apply a SkinID:

-- MasterPageBase
-- MasterPageBase.css

In web.config:

<pages styleSheetTheme="MasterPageBase">


<asp:GridView SkinID="SampleGridView" Runat="server" CellPadding="2" Font-Size="8pt">
<HeaderStyle CssClass="" forecolor="#F7F6F3" backcolor="#5D7B9D" font-bold="True" />
<RowStyle forecolor="#333333" backcolor="White" />
<AlternatingRowStyle backcolor="#F7F6F3" />
<PagerStyle forecolor="#00FFFF" backcolor="#284775" />

And in xGrid:

<cc2:xGrid ID="XGrid1" runat="server" AscImage="" SkinID="SampleGridView"

And the Warning Message:

A SkinID has specified but the page is not configured to use a page theme or stylesheet them. This is acceptable if the theme or stylesheet them will be set programmatically.

Why does this happen??? Is neccesary to use a special tag in skin file??? In the GridView this doesn't happen.

Apr 13, 2007 at 9:10 PM
I think the problem is that in you have to put <asp:xGrid SkinID="SampleGridView" ...>. I have used skins with xGrid in my programs and it works fine.
I hope this helps!!!
Apr 14, 2007 at 11:04 AM
Sorry, put <cc2:xGrid...> instead of <asp:GridView...> in the file
Apr 16, 2007 at 8:43 AM
Thanks for your help Javier:

I had try to change de tag <asp:GridView...> in by this <cc2:xGrid and when I compile my solution:

Etiqueta de servidor 'cc2:xGrid' desconocida.

Apr 17, 2007 at 6:39 AM
In my project, the file web.config has

<add tagPrefix="xGrid" namespace="CustomControls.Grid" assembly="CustomControls"/>

and the file has

<xGrid:xGrid SkinID="Generic" runat="server" BackColor="White"
GridLines="None" ShowHeader="False" AutoGenerateColumns="False"
AscImage="" DescImage="" EnableHeightResolver="True" Width="100%"
MouseOverColor="Transparent" AllowPaging="true" PageSize="16">

and it works.

Is the tagPrefix cc2 defined in the web.config file or in the page in your project? I think this is important.