| Home | Forums | Reviews | Articles | Register |
![]() |
| Thread Tools | Rate Thread |
|
|
|
| |
|
tshad
Guest
Posts: n/a
|
Also, if you look at it in Design view, it shows the Grid correctly with all
the colors applied. But when you try to run it, all the styles are gone???? Thanks, Tom "tshad" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)... > In 2008, I have the following in my css script - this is not the actual > colors just something to find out why it won't work: > *************************************************** > .Grid { border: solid 1px #FFFFFF; background-color:Red } > .Grid td > { > border: solid 1px #FFFFFF; > margin: 1px 1px 1px 1px; > padding: 1px 1px 1px 1px; > text-align: center; > } > .GridHeader > { > font-weight: bold; > background-color: #8b8dbb; > } > .GridItem > { > background-color: Green; > } > > .GridAltItem > { > background-color: red; > } > ******************************** > > In my .net page I have: > > <head runat="server"> > <title></title> > <link href="App_Data/AutoUPS.css" rel="stylesheet" type="text/css" /> > </head> > > > It obviously sees it since which I put start typing "CSSClass=", it shows > the classes in the file. > > I have the following: > > <asp:GridView ID="GridView1" > OnRowDataBound="ItemDataBoundEventHandler1" > AutoGenerateColumns="False" > CssClass="Grid" > runat="server"> > <AlternatingRowStyle CssClass="GridAltItem"/> > <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> > <Columns> > <asp:BoundField DataField="ID" HeaderText="id" > SortExpressionID" /> > <asp:BoundField DataField="Code" HeaderText="Code" > SortExpression="Code"/> > </Columns> > </asp:GridView> > > But all I get is a black and white grid. > > Why is that? > > Thanks, > > Tom > |
|
||
|
||||
|
tshad
Guest
Posts: n/a
|
Not sure why this may have been the case, but I had the css in the App_Data
instead of the App_Themes which seemed to work fine in the Design screen but not when run. It all seems to work fine now when using a GridView.skin file which uses the styles in my style sheets, except for my Labels. It is still showing as large blue. In View Source it shows as: <tr class="GridItem" Which I mentioned in another post. Obviously the color:Blue is overriding the GridItem style which has color set to black. It obviously sees the GridItem style and that is set to: ..Grid { border: solid 1px #FFFFFF;} ..Grid td { border: solid 1px #FFFFFF; margin: 1px 1px 1px 1px; padding: 1px 1px 1px 1px; text-align: center; } ..GridHeader { font-weight: bold; background-color: #8b8dbb; } ..GridViewRow { color:Black; } ..GridViewAlternatingRow { color:Black; } ..GridItem { background-color: #E9E9E9; color:Black; } ..GridAltItem { background-color: #FFFFFF; color:Black; } So where does the style="color:Blue;" come from? I have just about everything set to black. My skin is: <asp:GridView runat="server" SkinId="mGridViewSkin" > <RowStyle CssClass="GridViewRow" /> <SelectedRowStyle CssClass="GridViewSelectedRow" /> <AlternatingRowStyle CssClass="GridViewAlternatingRow" /> <FooterStyle CssClass="GridViewFooter" /> <HeaderStyle CssClass="GridViewHeader" VerticalAlign="Bottom" /> <PagerStyle CssClass="GridViewPager" /> </asp:GridView> Here is the start of my GridView. Labels only seem to be the problem. The Textboxes seem to work OK but even they have small fonts. <asp:GridView ID="GridView1" AutoGenerateColumns="False" SkinID="mGridViewSkin" CssClass="Grid100" AllowPaging="True" AllowSorting="True" PageSize="15" PagerSettings-Mode="NumericFirstLast" OnPageIndexChanged="mGridView_PageIndexChanged" OnRowEditing="GridView1_RowEditing" OnRowDataBound="ItemDataBoundEventHandler1" runat="server" > <AlternatingRowStyle CssClass="GridAltItem"/> <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> <Columns> <asp:TemplateField HeaderText="ID" HeaderStyle-Width="40px" Visible="True"> <ItemTemplate> <asp:Label ID="lblResponderFileExceptionID" runat="server" Text='<%# Bind("ResponderFileExceptionID") %>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Tracking Code"> <ItemTemplate> <asp:Label ID="lblTrackingCode" runat="server" Text='<%# Bind("TrackingCode") %>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtTrackingCode" runat="server" Width="40px" Text='<%# Bind("TrackingCode") %>' /> </EditItemTemplate> </asp:TemplateField> Is there some sort of setting I can't override? Thanks, Tom "tshad" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)... > Also, if you look at it in Design view, it shows the Grid correctly with > all the colors applied. > > But when you try to run it, all the styles are gone???? > > Thanks, > > Tom > > "tshad" <(E-Mail Removed)> wrote in message > news:(E-Mail Removed)... >> In 2008, I have the following in my css script - this is not the actual >> colors just something to find out why it won't work: >> *************************************************** >> .Grid { border: solid 1px #FFFFFF; background-color:Red } >> .Grid td >> { >> border: solid 1px #FFFFFF; >> margin: 1px 1px 1px 1px; >> padding: 1px 1px 1px 1px; >> text-align: center; >> } >> .GridHeader >> { >> font-weight: bold; >> background-color: #8b8dbb; >> } >> .GridItem >> { >> background-color: Green; >> } >> >> .GridAltItem >> { >> background-color: red; >> } >> ******************************** >> >> In my .net page I have: >> >> <head runat="server"> >> <title></title> >> <link href="App_Data/AutoUPS.css" rel="stylesheet" type="text/css" /> >> </head> >> >> >> It obviously sees it since which I put start typing "CSSClass=", it shows >> the classes in the file. >> >> I have the following: >> >> <asp:GridView ID="GridView1" >> OnRowDataBound="ItemDataBoundEventHandler1" >> AutoGenerateColumns="False" >> CssClass="Grid" >> runat="server"> >> <AlternatingRowStyle CssClass="GridAltItem"/> >> <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> >> <Columns> >> <asp:BoundField DataField="ID" HeaderText="id" >> SortExpressionID" /> >> <asp:BoundField DataField="Code" HeaderText="Code" >> SortExpression="Code"/> >> </Columns> >> </asp:GridView> >> >> But all I get is a black and white grid. >> >> Why is that? >> >> Thanks, >> >> Tom >> > > |
|
||
|
||||
|
tshad
Guest
Posts: n/a
|
It seems if I add a CSSClass to each Label, it works but not for the whole
GridView. It doesn't make much sense. If I have the color black set in the AlternatingRowStyle and RowStyle from the GridViews markup as well as a different set of classes in the .skin file which have the color at black, you would think that would make it black. Thanks, Tom "tshad" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)... > Not sure why this may have been the case, but I had the css in the > App_Data instead of the App_Themes which seemed to work fine in the Design > screen but not when run. > > It all seems to work fine now when using a GridView.skin file which uses > the styles in my style sheets, except for my Labels. It is still showing > as large blue. > > In View Source it shows as: > > <tr class="GridItem" > > Which I mentioned in another post. Obviously the color:Blue is overriding > the GridItem style which has color set to black. It obviously sees the > GridItem style and that is set to: > > .Grid { border: solid 1px #FFFFFF;} > .Grid td > { > border: solid 1px #FFFFFF; > margin: 1px 1px 1px 1px; > padding: 1px 1px 1px 1px; > text-align: center; > } > .GridHeader > { > font-weight: bold; > background-color: #8b8dbb; > } > .GridViewRow > { > color:Black; > } > .GridViewAlternatingRow > { > color:Black; > } > .GridItem > { > background-color: #E9E9E9; > color:Black; > } > > .GridAltItem > { > background-color: #FFFFFF; > color:Black; > } > So where does the style="color:Blue;" come from? I have just about > everything set to black. > > My skin is: > > <asp:GridView runat="server" SkinId="mGridViewSkin" > > <RowStyle CssClass="GridViewRow" /> > <SelectedRowStyle CssClass="GridViewSelectedRow" /> > <AlternatingRowStyle CssClass="GridViewAlternatingRow" /> > <FooterStyle CssClass="GridViewFooter" /> > <HeaderStyle CssClass="GridViewHeader" VerticalAlign="Bottom" /> > <PagerStyle CssClass="GridViewPager" /> > </asp:GridView> > > Here is the start of my GridView. Labels only seem to be the problem. > The Textboxes seem to work OK but even they have small fonts. > > <asp:GridView ID="GridView1" > AutoGenerateColumns="False" > SkinID="mGridViewSkin" > CssClass="Grid100" > AllowPaging="True" > AllowSorting="True" > PageSize="15" > PagerSettings-Mode="NumericFirstLast" > OnPageIndexChanged="mGridView_PageIndexChanged" > OnRowEditing="GridView1_RowEditing" > OnRowDataBound="ItemDataBoundEventHandler1" > runat="server" > > > <AlternatingRowStyle CssClass="GridAltItem"/> > <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> > <Columns> > <asp:TemplateField HeaderText="ID" > HeaderStyle-Width="40px" Visible="True"> > <ItemTemplate> > <asp:Label ID="lblResponderFileExceptionID" > runat="server" Text='<%# Bind("ResponderFileExceptionID") %>' /> > </ItemTemplate> > </asp:TemplateField> > <asp:TemplateField HeaderText="Tracking Code"> > <ItemTemplate> > <asp:Label ID="lblTrackingCode" > runat="server" Text='<%# Bind("TrackingCode") %>'></asp:Label> > </ItemTemplate> > <EditItemTemplate> > <asp:TextBox ID="txtTrackingCode" > runat="server" Width="40px" Text='<%# Bind("TrackingCode") %>' /> > </EditItemTemplate> > </asp:TemplateField> > > Is there some sort of setting I can't override? > > Thanks, > > Tom > > "tshad" <(E-Mail Removed)> wrote in message > news:%(E-Mail Removed)... >> Also, if you look at it in Design view, it shows the Grid correctly with >> all the colors applied. >> >> But when you try to run it, all the styles are gone???? >> >> Thanks, >> >> Tom >> >> "tshad" <(E-Mail Removed)> wrote in message >> news:(E-Mail Removed)... >>> In 2008, I have the following in my css script - this is not the actual >>> colors just something to find out why it won't work: >>> *************************************************** >>> .Grid { border: solid 1px #FFFFFF; background-color:Red } >>> .Grid td >>> { >>> border: solid 1px #FFFFFF; >>> margin: 1px 1px 1px 1px; >>> padding: 1px 1px 1px 1px; >>> text-align: center; >>> } >>> .GridHeader >>> { >>> font-weight: bold; >>> background-color: #8b8dbb; >>> } >>> .GridItem >>> { >>> background-color: Green; >>> } >>> >>> .GridAltItem >>> { >>> background-color: red; >>> } >>> ******************************** >>> >>> In my .net page I have: >>> >>> <head runat="server"> >>> <title></title> >>> <link href="App_Data/AutoUPS.css" rel="stylesheet" type="text/css" /> >>> </head> >>> >>> >>> It obviously sees it since which I put start typing "CSSClass=", it >>> shows the classes in the file. >>> >>> I have the following: >>> >>> <asp:GridView ID="GridView1" >>> OnRowDataBound="ItemDataBoundEventHandler1" >>> AutoGenerateColumns="False" >>> CssClass="Grid" >>> runat="server"> >>> <AlternatingRowStyle CssClass="GridAltItem"/> >>> <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> >>> <Columns> >>> <asp:BoundField DataField="ID" HeaderText="id" >>> SortExpressionID" /> >>> <asp:BoundField DataField="Code" HeaderText="Code" >>> SortExpression="Code"/> >>> </Columns> >>> </asp:GridView> >>> >>> But all I get is a black and white grid. >>> >>> Why is that? >>> >>> Thanks, >>> >>> Tom >>> >> >> > > |
|
||
|
||||
|
tshad
Guest
Posts: n/a
|
I found that if I added a new skin I can make it work, since the css doesn't
seem to work, nor does the GridView.skin as shown below work for the labels (which are just span elements in IE). I created a text.skin that has: <asp:Label runat="server" Font-Bold="false" Style="Font-Family: Verdana, Arial, Helvetica, sans-serif; Font-Size: xx-small" ForeColor="Black" Text="Label"/> <asp:TextBox runat="server" Font-Bold="false" Style="Font-Family: Verdana, Arial, Helvetica, sans-serif; Font-Size: x-small" ForeColor="Black"/> But this is for the whole page and not just the GridView. I tried to add the above to the GridView.skin and took out the text.skin: <asp:GridView runat="server" SkinId="mGridViewSkin" > <RowStyle CssClass="GridViewRow" /> <SelectedRowStyle CssClass="GridViewSelectedRow" /> <AlternatingRowStyle CssClass="GridViewAlternatingRow" /> <FooterStyle CssClass="GridViewFooter" /> <HeaderStyle CssClass="GridViewHeader" VerticalAlign="Bottom" /> <PagerStyle CssClass="GridViewPager" /> <asp:Label runat="server" Font-Bold="false" Style="Font-Family: Verdana, Arial, Helvetica, sans-serif; Font-Size: Large" ForeColor="Black" Text="Label"/> <asp:TextBox runat="server" Font-Bold="false" Style="Font-Family: Verdana, Arial, Helvetica, sans-serif; Font-Size: x-small" ForeColor="Black"/> </asp:GridView> But now my grid is all blue again. I also found that my paging is also in large blue. I want to use a different style for my Grid and the rest of the page. How do I do that??? Thanks, Tom "tshad" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)... > It seems if I add a CSSClass to each Label, it works but not for the whole > GridView. > > It doesn't make much sense. > > If I have the color black set in the AlternatingRowStyle and RowStyle from > the GridViews markup as well as a different set of classes in the .skin > file which have the color at black, you would think that would make it > black. > > Thanks, > > Tom > > "tshad" <(E-Mail Removed)> wrote in message > news:(E-Mail Removed)... >> Not sure why this may have been the case, but I had the css in the >> App_Data instead of the App_Themes which seemed to work fine in the >> Design screen but not when run. >> >> It all seems to work fine now when using a GridView.skin file which uses >> the styles in my style sheets, except for my Labels. It is still showing >> as large blue. >> >> In View Source it shows as: >> >> <tr class="GridItem" >> >> Which I mentioned in another post. Obviously the color:Blue is >> overriding the GridItem style which has color set to black. It obviously >> sees the GridItem style and that is set to: >> >> .Grid { border: solid 1px #FFFFFF;} >> .Grid td >> { >> border: solid 1px #FFFFFF; >> margin: 1px 1px 1px 1px; >> padding: 1px 1px 1px 1px; >> text-align: center; >> } >> .GridHeader >> { >> font-weight: bold; >> background-color: #8b8dbb; >> } >> .GridViewRow >> { >> color:Black; >> } >> .GridViewAlternatingRow >> { >> color:Black; >> } >> .GridItem >> { >> background-color: #E9E9E9; >> color:Black; >> } >> >> .GridAltItem >> { >> background-color: #FFFFFF; >> color:Black; >> } >> So where does the style="color:Blue;" come from? I have just about >> everything set to black. >> >> My skin is: >> >> <asp:GridView runat="server" SkinId="mGridViewSkin" > >> <RowStyle CssClass="GridViewRow" /> >> <SelectedRowStyle CssClass="GridViewSelectedRow" /> >> <AlternatingRowStyle CssClass="GridViewAlternatingRow" /> >> <FooterStyle CssClass="GridViewFooter" /> >> <HeaderStyle CssClass="GridViewHeader" VerticalAlign="Bottom" /> >> <PagerStyle CssClass="GridViewPager" /> >> </asp:GridView> >> >> Here is the start of my GridView. Labels only seem to be the problem. >> The Textboxes seem to work OK but even they have small fonts. >> >> <asp:GridView ID="GridView1" >> AutoGenerateColumns="False" >> SkinID="mGridViewSkin" >> CssClass="Grid100" >> AllowPaging="True" >> AllowSorting="True" >> PageSize="15" >> PagerSettings-Mode="NumericFirstLast" >> OnPageIndexChanged="mGridView_PageIndexChanged" >> OnRowEditing="GridView1_RowEditing" >> OnRowDataBound="ItemDataBoundEventHandler1" >> runat="server" >> > >> <AlternatingRowStyle CssClass="GridAltItem"/> >> <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> >> <Columns> >> <asp:TemplateField HeaderText="ID" >> HeaderStyle-Width="40px" Visible="True"> >> <ItemTemplate> >> <asp:Label >> ID="lblResponderFileExceptionID" runat="server" Text='<%# >> Bind("ResponderFileExceptionID") %>' /> >> </ItemTemplate> >> </asp:TemplateField> >> <asp:TemplateField HeaderText="Tracking Code"> >> <ItemTemplate> >> <asp:Label ID="lblTrackingCode" >> runat="server" Text='<%# Bind("TrackingCode") %>'></asp:Label> >> </ItemTemplate> >> <EditItemTemplate> >> <asp:TextBox ID="txtTrackingCode" >> runat="server" Width="40px" Text='<%# Bind("TrackingCode") %>' /> >> </EditItemTemplate> >> </asp:TemplateField> >> >> Is there some sort of setting I can't override? >> >> Thanks, >> >> Tom >> >> "tshad" <(E-Mail Removed)> wrote in message >> news:%(E-Mail Removed)... >>> Also, if you look at it in Design view, it shows the Grid correctly with >>> all the colors applied. >>> >>> But when you try to run it, all the styles are gone???? >>> >>> Thanks, >>> >>> Tom >>> >>> "tshad" <(E-Mail Removed)> wrote in message >>> news:(E-Mail Removed)... >>>> In 2008, I have the following in my css script - this is not the actual >>>> colors just something to find out why it won't work: >>>> *************************************************** >>>> .Grid { border: solid 1px #FFFFFF; background-color:Red } >>>> .Grid td >>>> { >>>> border: solid 1px #FFFFFF; >>>> margin: 1px 1px 1px 1px; >>>> padding: 1px 1px 1px 1px; >>>> text-align: center; >>>> } >>>> .GridHeader >>>> { >>>> font-weight: bold; >>>> background-color: #8b8dbb; >>>> } >>>> .GridItem >>>> { >>>> background-color: Green; >>>> } >>>> >>>> .GridAltItem >>>> { >>>> background-color: red; >>>> } >>>> ******************************** >>>> >>>> In my .net page I have: >>>> >>>> <head runat="server"> >>>> <title></title> >>>> <link href="App_Data/AutoUPS.css" rel="stylesheet" type="text/css" >>>> /> >>>> </head> >>>> >>>> >>>> It obviously sees it since which I put start typing "CSSClass=", it >>>> shows the classes in the file. >>>> >>>> I have the following: >>>> >>>> <asp:GridView ID="GridView1" >>>> OnRowDataBound="ItemDataBoundEventHandler1" >>>> AutoGenerateColumns="False" >>>> CssClass="Grid" >>>> runat="server"> >>>> <AlternatingRowStyle CssClass="GridAltItem"/> >>>> <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> >>>> <Columns> >>>> <asp:BoundField DataField="ID" HeaderText="id" >>>> SortExpressionID" /> >>>> <asp:BoundField DataField="Code" HeaderText="Code" >>>> SortExpression="Code"/> >>>> </Columns> >>>> </asp:GridView> >>>> >>>> But all I get is a black and white grid. >>>> >>>> Why is that? >>>> >>>> Thanks, >>>> >>>> Tom >>>> >>> >>> >> >> > > |
|
||
|
||||
|
Patrice
Guest
Posts: n/a
|
App_Data is to store private data (such as a database file). So what you put
in this directoy won't be served by IIS hence likely your problem... -- Patrice "tshad" <(E-Mail Removed)> a écrit dans le message de groupe de discussion : (E-Mail Removed)... > Not sure why this may have been the case, but I had the css in the > App_Data instead of the App_Themes which seemed to work fine in the Design > screen but not when run. > > It all seems to work fine now when using a GridView.skin file which uses > the styles in my style sheets, except for my Labels. It is still showing > as large blue. > > In View Source it shows as: > > <tr class="GridItem" > > Which I mentioned in another post. Obviously the color:Blue is overriding > the GridItem style which has color set to black. It obviously sees the > GridItem style and that is set to: > > .Grid { border: solid 1px #FFFFFF;} > .Grid td > { > border: solid 1px #FFFFFF; > margin: 1px 1px 1px 1px; > padding: 1px 1px 1px 1px; > text-align: center; > } > .GridHeader > { > font-weight: bold; > background-color: #8b8dbb; > } > .GridViewRow > { > color:Black; > } > .GridViewAlternatingRow > { > color:Black; > } > .GridItem > { > background-color: #E9E9E9; > color:Black; > } > > .GridAltItem > { > background-color: #FFFFFF; > color:Black; > } > So where does the style="color:Blue;" come from? I have just about > everything set to black. > > My skin is: > > <asp:GridView runat="server" SkinId="mGridViewSkin" > > <RowStyle CssClass="GridViewRow" /> > <SelectedRowStyle CssClass="GridViewSelectedRow" /> > <AlternatingRowStyle CssClass="GridViewAlternatingRow" /> > <FooterStyle CssClass="GridViewFooter" /> > <HeaderStyle CssClass="GridViewHeader" VerticalAlign="Bottom" /> > <PagerStyle CssClass="GridViewPager" /> > </asp:GridView> > > Here is the start of my GridView. Labels only seem to be the problem. > The Textboxes seem to work OK but even they have small fonts. > > <asp:GridView ID="GridView1" > AutoGenerateColumns="False" > SkinID="mGridViewSkin" > CssClass="Grid100" > AllowPaging="True" > AllowSorting="True" > PageSize="15" > PagerSettings-Mode="NumericFirstLast" > OnPageIndexChanged="mGridView_PageIndexChanged" > OnRowEditing="GridView1_RowEditing" > OnRowDataBound="ItemDataBoundEventHandler1" > runat="server" > > > <AlternatingRowStyle CssClass="GridAltItem"/> > <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> > <Columns> > <asp:TemplateField HeaderText="ID" > HeaderStyle-Width="40px" Visible="True"> > <ItemTemplate> > <asp:Label ID="lblResponderFileExceptionID" > runat="server" Text='<%# Bind("ResponderFileExceptionID") %>' /> > </ItemTemplate> > </asp:TemplateField> > <asp:TemplateField HeaderText="Tracking Code"> > <ItemTemplate> > <asp:Label ID="lblTrackingCode" > runat="server" Text='<%# Bind("TrackingCode") %>'></asp:Label> > </ItemTemplate> > <EditItemTemplate> > <asp:TextBox ID="txtTrackingCode" > runat="server" Width="40px" Text='<%# Bind("TrackingCode") %>' /> > </EditItemTemplate> > </asp:TemplateField> > > Is there some sort of setting I can't override? > > Thanks, > > Tom > > "tshad" <(E-Mail Removed)> wrote in message > news:%(E-Mail Removed)... >> Also, if you look at it in Design view, it shows the Grid correctly with >> all the colors applied. >> >> But when you try to run it, all the styles are gone???? >> >> Thanks, >> >> Tom >> >> "tshad" <(E-Mail Removed)> wrote in message >> news:(E-Mail Removed)... >>> In 2008, I have the following in my css script - this is not the actual >>> colors just something to find out why it won't work: >>> *************************************************** >>> .Grid { border: solid 1px #FFFFFF; background-color:Red } >>> .Grid td >>> { >>> border: solid 1px #FFFFFF; >>> margin: 1px 1px 1px 1px; >>> padding: 1px 1px 1px 1px; >>> text-align: center; >>> } >>> .GridHeader >>> { >>> font-weight: bold; >>> background-color: #8b8dbb; >>> } >>> .GridItem >>> { >>> background-color: Green; >>> } >>> >>> .GridAltItem >>> { >>> background-color: red; >>> } >>> ******************************** >>> >>> In my .net page I have: >>> >>> <head runat="server"> >>> <title></title> >>> <link href="App_Data/AutoUPS.css" rel="stylesheet" type="text/css" /> >>> </head> >>> >>> >>> It obviously sees it since which I put start typing "CSSClass=", it >>> shows the classes in the file. >>> >>> I have the following: >>> >>> <asp:GridView ID="GridView1" >>> OnRowDataBound="ItemDataBoundEventHandler1" >>> AutoGenerateColumns="False" >>> CssClass="Grid" >>> runat="server"> >>> <AlternatingRowStyle CssClass="GridAltItem"/> >>> <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> >>> <Columns> >>> <asp:BoundField DataField="ID" HeaderText="id" >>> SortExpressionID" /> >>> <asp:BoundField DataField="Code" HeaderText="Code" >>> SortExpression="Code"/> >>> </Columns> >>> </asp:GridView> >>> >>> But all I get is a black and white grid. >>> >>> Why is that? >>> >>> Thanks, >>> >>> Tom >>> >> >> > > |
|
||
|
||||
|
tshad
Guest
Posts: n/a
|
That was it, I needed to put it in App_Themes.
Thanks, Tom "Patrice" <http://scribe-en.blogspot.com/> wrote in message news:%(E-Mail Removed)... > App_Data is to store private data (such as a database file). So what you > put in this directoy won't be served by IIS hence likely your problem... > > > > -- > Patrice > > "tshad" <(E-Mail Removed)> a écrit dans le message de groupe de discussion : > (E-Mail Removed)... >> Not sure why this may have been the case, but I had the css in the >> App_Data instead of the App_Themes which seemed to work fine in the >> Design screen but not when run. >> >> It all seems to work fine now when using a GridView.skin file which uses >> the styles in my style sheets, except for my Labels. It is still showing >> as large blue. >> >> In View Source it shows as: >> >> <tr class="GridItem" >> >> Which I mentioned in another post. Obviously the color:Blue is >> overriding the GridItem style which has color set to black. It obviously >> sees the GridItem style and that is set to: >> >> .Grid { border: solid 1px #FFFFFF;} >> .Grid td >> { >> border: solid 1px #FFFFFF; >> margin: 1px 1px 1px 1px; >> padding: 1px 1px 1px 1px; >> text-align: center; >> } >> .GridHeader >> { >> font-weight: bold; >> background-color: #8b8dbb; >> } >> .GridViewRow >> { >> color:Black; >> } >> .GridViewAlternatingRow >> { >> color:Black; >> } >> .GridItem >> { >> background-color: #E9E9E9; >> color:Black; >> } >> >> .GridAltItem >> { >> background-color: #FFFFFF; >> color:Black; >> } >> So where does the style="color:Blue;" come from? I have just about >> everything set to black. >> >> My skin is: >> >> <asp:GridView runat="server" SkinId="mGridViewSkin" > >> <RowStyle CssClass="GridViewRow" /> >> <SelectedRowStyle CssClass="GridViewSelectedRow" /> >> <AlternatingRowStyle CssClass="GridViewAlternatingRow" /> >> <FooterStyle CssClass="GridViewFooter" /> >> <HeaderStyle CssClass="GridViewHeader" VerticalAlign="Bottom" /> >> <PagerStyle CssClass="GridViewPager" /> >> </asp:GridView> >> >> Here is the start of my GridView. Labels only seem to be the problem. >> The Textboxes seem to work OK but even they have small fonts. >> >> <asp:GridView ID="GridView1" >> AutoGenerateColumns="False" >> SkinID="mGridViewSkin" >> CssClass="Grid100" >> AllowPaging="True" >> AllowSorting="True" >> PageSize="15" >> PagerSettings-Mode="NumericFirstLast" >> OnPageIndexChanged="mGridView_PageIndexChanged" >> OnRowEditing="GridView1_RowEditing" >> OnRowDataBound="ItemDataBoundEventHandler1" >> runat="server" >> > >> <AlternatingRowStyle CssClass="GridAltItem"/> >> <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> >> <Columns> >> <asp:TemplateField HeaderText="ID" >> HeaderStyle-Width="40px" Visible="True"> >> <ItemTemplate> >> <asp:Label >> ID="lblResponderFileExceptionID" runat="server" Text='<%# >> Bind("ResponderFileExceptionID") %>' /> >> </ItemTemplate> >> </asp:TemplateField> >> <asp:TemplateField HeaderText="Tracking Code"> >> <ItemTemplate> >> <asp:Label ID="lblTrackingCode" >> runat="server" Text='<%# Bind("TrackingCode") %>'></asp:Label> >> </ItemTemplate> >> <EditItemTemplate> >> <asp:TextBox ID="txtTrackingCode" >> runat="server" Width="40px" Text='<%# Bind("TrackingCode") %>' /> >> </EditItemTemplate> >> </asp:TemplateField> >> >> Is there some sort of setting I can't override? >> >> Thanks, >> >> Tom >> >> "tshad" <(E-Mail Removed)> wrote in message >> news:%(E-Mail Removed)... >>> Also, if you look at it in Design view, it shows the Grid correctly with >>> all the colors applied. >>> >>> But when you try to run it, all the styles are gone???? >>> >>> Thanks, >>> >>> Tom >>> >>> "tshad" <(E-Mail Removed)> wrote in message >>> news:(E-Mail Removed)... >>>> In 2008, I have the following in my css script - this is not the actual >>>> colors just something to find out why it won't work: >>>> *************************************************** >>>> .Grid { border: solid 1px #FFFFFF; background-color:Red } >>>> .Grid td >>>> { >>>> border: solid 1px #FFFFFF; >>>> margin: 1px 1px 1px 1px; >>>> padding: 1px 1px 1px 1px; >>>> text-align: center; >>>> } >>>> .GridHeader >>>> { >>>> font-weight: bold; >>>> background-color: #8b8dbb; >>>> } >>>> .GridItem >>>> { >>>> background-color: Green; >>>> } >>>> >>>> .GridAltItem >>>> { >>>> background-color: red; >>>> } >>>> ******************************** >>>> >>>> In my .net page I have: >>>> >>>> <head runat="server"> >>>> <title></title> >>>> <link href="App_Data/AutoUPS.css" rel="stylesheet" type="text/css" >>>> /> >>>> </head> >>>> >>>> >>>> It obviously sees it since which I put start typing "CSSClass=", it >>>> shows the classes in the file. >>>> >>>> I have the following: >>>> >>>> <asp:GridView ID="GridView1" >>>> OnRowDataBound="ItemDataBoundEventHandler1" >>>> AutoGenerateColumns="False" >>>> CssClass="Grid" >>>> runat="server"> >>>> <AlternatingRowStyle CssClass="GridAltItem"/> >>>> <RowStyle CssClass="GridItem" ForeColor="#0000FF"/> >>>> <Columns> >>>> <asp:BoundField DataField="ID" HeaderText="id" >>>> SortExpressionID" /> >>>> <asp:BoundField DataField="Code" HeaderText="Code" >>>> SortExpression="Code"/> >>>> </Columns> >>>> </asp:GridView> >>>> >>>> But all I get is a black and white grid. >>>> >>>> Why is that? >>>> >>>> Thanks, >>>> >>>> Tom >>>> >>> >>> >> >> > |
|
||
|
||||
|
|
|
| |
![]() |
| Thread Tools | |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Loop all Sheets not working. | =?Utf-8?B?UGFuaw==?= | Microsoft Excel New Users | 12 | 27th Feb 2007 11:55 AM |
| working with a group of sheets | GKeramidas | Microsoft Excel Programming | 4 | 4th Sep 2006 05:05 PM |
| working with two sheets | =?Utf-8?B?c3RldmU=?= | Microsoft Excel Programming | 3 | 24th Jun 2005 07:52 PM |
| Addin working on all sheets | Rune Pedersen | Microsoft Excel Programming | 1 | 31st Aug 2004 02:45 PM |
| Working with multiple sheets | Jim | Microsoft Excel Programming | 1 | 10th Feb 2004 01:30 PM |
Powered by vBulletin®. Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2010, Crawlability, Inc. |




