By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,616 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

gridview style not show during runtime

P: 48
here is my gridview code for my website.
Expand|Select|Wrap|Line Numbers
  1. <itcgv:ITCGridView ID="GridView1" EnableViewState="true" PageIndex="0" ViewStateMode="enabled" EnableSortingAndPagingCallbacks="True" CssClass="GridView" OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="true" PageSize="30" AllowSorting="true" OnSorting="gvFreightBills_Sorting" runat="server" CellPadding="1" CellSpacing="2" GridLines="Vertical" HorizontalAlign="Left" AutoGenerateColumns="false" PagerSettings-Position="TopAndBottom" RowStyle-Height="19" DataKeyNames="DATE_ENT,CARRIER,PRO" PagerSettings-Mode="NextPreviousFirstLast">
  2.  
  3.  
  4.                     <AlternatingRowStyle BackColor="#CCCCCC" />
  5.                     <Columns>
  6.                         <asp:CommandField ControlStyle-CssClass="GridViewSelectButton" HeaderStyle-Width="40" ItemStyle-Width="40" SelectText="Select" ShowSelectButton="true" ItemStyle-HorizontalAlign="center"></asp:CommandField>
  7.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="SHIP_DATE" HeaderText="Ship Date" SortExpression="tbl_Bills.[Date]" DataFormatString="{0:d}"></asp:BoundField>
  8.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="DATE_ENT" HeaderText="Date Ent." SortExpression="tbl_Bills.[DATE ENT]" DataFormatString="{0:d}"></asp:BoundField>
  9.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="CARRIER" HeaderText="Carrier" ReadOnly="True" SortExpression="CARRIER" HeaderStyle-Width="40" ItemStyle-Width="40"></asp:BoundField>
  10.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="PRO" HeaderText="PRO" ReadOnly="True" SortExpression="PRO"></asp:BoundField>
  11.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="spec_fedinv" HeaderText="Invoice No" SortExpression="tbl_bills.[spec_fedinv]"></asp:BoundField>
  12.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="SHIPPER" HeaderText="Shipper" SortExpression="SHIPPER" ControlStyle-Width="40" HeaderStyle-Width="40" ItemStyle-Width="40"></asp:BoundField>
  13.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="CONS" HeaderText="CONS" SortExpression="CONS" ControlStyle-Width="40" HeaderStyle-Width="40" ItemStyle-Width="40"></asp:BoundField>
  14.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="F_B" HeaderText="F B" SortExpression="F_B"></asp:BoundField>
  15.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="LOC" HeaderText="Loc" SortExpression="LOC"></asp:BoundField>
  16.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="PCS" HeaderText="PCS" SortExpression="PCS" ControlStyle-Width="30" HeaderStyle-Width="30" ItemStyle-Width="30"></asp:BoundField>
  17.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="WT" HeaderText="WT" SortExpression="WT" ControlStyle-Width="30" HeaderStyle-Width="30" ItemStyle-Width="30"></asp:BoundField>
  18.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="NET_CHGS" HeaderText="NET Chgs." SortExpression="NET_CHGS" DataFormatString="{0:$0.00}"></asp:BoundField>
  19.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="DATE_PAID" HeaderText="Date Paid" SortExpression="tbl_Bills.[DATE PAID]" DataFormatString="{0:d}"></asp:BoundField>
  20.                         <asp:BoundField ItemStyle-CssClass="GVCol" DataField="CK_NO" HeaderText="CK No." SortExpression="tbl_Bills.[CK NO]"></asp:BoundField>
  21.                     </Columns>
  22.                     <FooterStyle BackColor="#CCCCCC" />
  23.                     <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
  24.                     <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NextPreviousFirstLast" NextPageText="Next" PreviousPageText="Prev" />
  25.                     <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
  26.                     <RowStyle Height="19px"></RowStyle>
  27.                     <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
  28.                 </itcgv:ITCGridView>
  29.  
  30.  
  31.                 <div style="clear: both;"></div>
i have attached a screenshot from when i am in design view in visual studio see vsScreenshot

during runtime, it shows up completely different, like it completely ignores all the style rules. see runtimeScreenshot

I am not sure what could be happening here. please help
Attached Files
File Type: docx runtimescreenshot.docx (630.9 KB, 219 views)
File Type: docx vsscreenshot.docx (445.8 KB, 212 views)
Oct 1 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.