Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > ItemStyle-With property does nothing!

Reply
Thread Tools

ItemStyle-With property does nothing!

 
 
col1blb@ups.com
Guest
Posts: n/a
 
      11-18-2005
This is driving me crazy. I have a page (pageA) with a datagrid. The
datagrid's width, with no formatting is wider than the screen and no
matter how i try to set the width of a bound column, it will not
change. I have another page (pageB) with a datagrid that is smaller
than the width of the screen and if I change the width of a column on
that one, it works. Can anyone help me figure out why? I have
included my pageA code if anyone wants to take a look. Thanks.

<%@ Page Inherits="variance" Src="variance.vb" %>
<html>
<head>
<title>Variance Report for RRDD: <% Response.Write(Session("RRDD"))
%></title>
<link href="styles.css" rel="stylesheet" />
</head>

<body>
<form runat="server" language="vb">
<table width="100%" border="0" cellspacing="0" cellpadding="0"
background="Images/header_bg.gif">
<tr>
<td><img src="Images/header_top.gif" width="450" height="142"
alt="Customer Counter Web System" /></td>
</tr>
</table>

<table border="0" cellspacing="0" cellpadding="10">
<tr>
<td align="center">
<p><asp:Label id="lblGMA" runat="server" /><br />
<asp:Label id="lblUserName" runat="server" /><br /></p>

<asp:Image id="imgHome" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<asp:HyperLink id="hlHome" NavigateUrl="index.aspx" runat="server"
Text="Home" />

<asp:Image id="imgUnmatched" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<asp:HyperLink id="hlUnmatched" NavigateUrl="unmatched.aspx"
runat="server" Text="Unmatched Envelopes" />

<asp:Image id="imgVariance" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<asp:HyperLink id="hlVariance" NavigateUrl="variance.aspx"
runat="server" Text="Variance Report" />

<asp:Image id="imgFollowups" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<!-- Leave the Navigate Url out until I figure out what their
access level is -->
<asp:HyperLink id="hlFollowups" runat="server" Text="Follow-Ups" />

<asp:Image id="imgAdjustments" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<!-- Leave the Navigate Url out until I figure out what their
access level is -->
<asp:HyperLink id="hlAdjustments" runat="server" Text="Adjustments"
/>

<asp:Image id="imgWriteOffs" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<!-- Leave the Navigate Url out until I figure out what their
access level is -->
<asp:HyperLink id="hlWriteOffs" runat="server" Text="Write Offs" />

<asp:Image id="imgReconReports" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<asp:HyperLink id="hlReconReports" NavigateUrl="recon.aspx"
runat="server" Text="Recon Reports" />

<asp:Image id="imgCCAdmin" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<asp:HyperLink id="hlCCAdmin" NavigateUrl="ccadmin.aspx"
runat="server" Text="CC Administration" />

<asp:Image id="imgReconAdmin" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<asp:HyperLink id="hlReconAdmin" NavigateUrl="reconadmin.aspx"
runat="server" Text="Recon Administration" />

<asp:Image id="imgSiteAdmin" ImageUrl="Images/book_closed.gif"
runat="server" AlternateText="+" />
<asp:HyperLink id="hlSiteAdmin" NavigateUrl="siteadmin.aspx"
runat="server" Text="Site Administration" /> </td>
</tr>
<tr>
<td valign="top">
<h1 align="center">Customer Counter Variance for RRDD: <asp:Label
id="lblRRDD" runat="server" /> </h1>
<h2 align="center">Starting Collection Date: <asp:TextBox
id="txtStartColDate" TextMode="singleline" Columns="10" runat="server"
/> <br />
Ending Collection Date: <asp:TextBox id="txtEndColDate"
TextMode="singleline" Columns="10" runat="server" />
<br />
<asp:Button id="btnRefresh" Text="Refresh" runat="server"
CssClass="button" />
<br />
<asp:CompareValidator id="cvStartColDate" Operator="DataTypeCheck"
Type="Date" ControlToValidate="txtStartcolDate" runat="server"
ErrorMessage="You must enter the starting collection date in the format
mm/dd/yyyy!" /> <br />
<asp:CompareValidator id="cvEndColDate" Operator="DataTypeCheck"
Type="Date" ControlToValidate="txtEndcolDate" runat="server"
ErrorMessage="You must enter the ending collection date in the format
mm/dd/yyyy!" />


<br />
<aspataGrid id="dgVariance" runat="server"
AutoGenerateColumns="false" CellPadding="4"
OnItemCommand="dg_CenterDetail" OnItemCreated="dgVariance_ItemCreated"
>

<ItemStyle Font-Name="Arial" Font-Size="10px" ForeColor="#000000"
/>
<HeaderStyle CssClass="gridheader" />
<AlternatingItemStyle Font-Name="Arial" Font-Size="10px"
BackColor="#CCCCCC" />
<Columns>
<asp:BoundColumn DataField="Center" HeaderText="SLIC" />
<asp:BoundColumn DataField="Shipper" HeaderText="Shipper" />
<asp:BoundColumn DataField="Center Name" HeaderText="Center" />
<asp:BoundColumn DataField="Cash Declared" HeaderText="Cash
Declared" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Cash Counted" HeaderText="Cash
Counted" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn ItemStyle-Width="500px" DataField="Cash O/S"
HeaderText="Cash O/S" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Checks Declared" HeaderText="Checks
Declared" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Checks Counted" HeaderText="Checks
Counted" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Checks O/S" ItemStyle-Width="50px"
HeaderText="Checks O/S" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Credit Cards Declared"
HeaderText="Credit Cards Declared" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Credit Cards Collected"
HeaderText="Credit Cards Collected" DataFormatString="{0:$#,##0.00}"
/>
<asp:BoundColumn DataField="Credit Cards O/S"
ItemStyle-Width="50px" HeaderText="Credit Cards O/S"
DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Petty Cash" HeaderText="Petty Cash"
DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Total Collected" HeaderText="Total
Collected" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="IShip Revenue" HeaderText="IShip
Revenue" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Services and Packaids"
HeaderText="Services and Packaids" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Taxes" HeaderText="Taxes"
ItemStyle-HorizontalAlign="Right" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Gift Card Revenue" HeaderText="Gift
Cards" DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Total Sales" HeaderText="Total Sales"
DataFormatString="{0:$#,##0.00}" />
<asp:BoundColumn DataField="Variance" HeaderText="Variance"
DataFormatString="{0:$#,##0.00}" />
<asp:ButtonColumn ItemStyle-HorizontalAlign="center"
ButtonType="PushButton" Text="Details" CommandName="Details" />
</Columns>
</aspataGrid>
<br /><br />
<!-- <asp:Button id="btnExport" Text="Export To Excel"
runat="server" CssClass="button" align="center"/> -->
</h2>
</td>
</tr>
</table>
</form>

</body>
</html>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding to property of property of object collection TS ASP .Net 3 08-31-2006 12:57 PM
TableCell: BackColor Property But No BackGround Property? Nathan Sokalski ASP .Net 1 04-29-2006 10:09 PM
DataBinder.Eval for an object's property property... like Eval(Container.DataItem,"Version.Major") Eric Newton ASP .Net 3 04-04-2005 10:11 PM
Set CSS property equal to another CSS property? Noozer HTML 10 10-13-2004 09:20 PM
Is there a way to set the a CSS property to be explicitly the same as another CSS property? Joshua Beall HTML 1 12-10-2003 07:21 PM



Advertisments