How to apply skin in Query DataGrid

Pritam Gupta asked on January 21, 2016 09:58

Hello, I want to apply skin to QueryDataGrid which is a Custom Table DataGrid,So Please tell me that how can i use skin and please tell me the attributes of QueryDataGrid like this

<cms:CMSCalendar runat="server" SkinID="EventCalendar" Width="100%"> <NextPrevStyle Font-Bold="True" ForeColor="#585880" BorderColor="Transparent" BackColor="Transparent" /> <SelectorStyle Font-Bold="True" ForeColor="#696969" BackColor="#F8F7F4" /> <WeekendDayStyle Font-Bold="False" ForeColor="#000000" BackColor="transparent" /> <DayHeaderStyle Font-Bold="True" ForeColor="#585880" BackColor="Transparent" /> </cms:CMSCalendar>

Recent Answers


Brenden Kehren answered on January 21, 2016 14:27

You can use the standard asp.net skins. In this case you'd create a Default.skin file in your /App_Themes/<stylesheetcodename>/ directory. Inside that directory, add something like this:

<cms:CMSCalendar runat="server" Width="100%" Height="100%" SkinId="EventCalendar" SelectionMode="None" NextPrevStyle-Font-Size="14px" NextPrevFormat="ShortMonth">
    <TitleStyle Font-Bold="true" Font-Size="18px" />
    <DayHeaderStyle BackColor="#c02e39" ForeColor="White" Font-Bold="true" Height="35px" BorderColor="DimGray" BorderStyle="Solid" BorderWidth="1px" />
    <DayStyle BackColor="White" ForeColor="Black" Font-Underline="false" VerticalAlign="Top" HorizontalAlign="Center" Height="7em" Width="2em" BorderColor="DimGray" BorderStyle="Solid" BorderWidth="1px" />
    <TodayDayStyle BackColor="#c02e39"  ForeColor="White" />
    <WeekendDayStyle BackColor="#e8e8e8" BorderColor="Gray" />
    <OtherMonthDayStyle BackColor="#CCCCCC" ForeColor="DimGray" />  
</cms:CMSCalendar>

The key is to use the proper control, in your case <cms:CMSCalendar> AND assign a SkinId to it. If you don't apply a SkinId, it will be used across ALL those controls on the website. If you do apply a SkinId, you have to reference that ID in your controls you wish to use this skin.

0 votesVote for this answer Mark as a Correct answer

Pritam Gupta answered on January 21, 2016 14:44 (last edited on January 21, 2016 14:45)

Thanks for your response but I want only Properties of QueryDatagrid, like TitleStyle, DayHeaderStyle which is in <cms:CMSCalendar>

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 21, 2016 16:12

Then only set those properties, remove the extra properties that I've added in the example I provided.

0 votesVote for this answer Mark as a Correct answer

Pritam Gupta answered on January 22, 2016 06:57

I want Properties of QueryDataGrid not calendar.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.