Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
col1blb@ups.com #1
ItemStyle-With property does nothing!
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 />
<asp:DataGrid 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>
</asp:DataGrid>
<br /><br />
<!-- <asp:Button id="btnExport" Text="Export To Excel"
runat="server" CssClass="button" align="center"/> -->
</h2>
</td>
</tr>
</table>
</form>
</body>
</html>
col1blb@ups.com Guest
-
#29234 [Com]: empty($object->property) incorrect when property has access overloaded (__get)
ID: 29234 Comment by: phpbugs at thunder-2000 dot com Reported By: chrissy at codegoat dot com Status: No... -
ItemStyle question
Hello sirs, In my aspx file I have a datagrid with some BoundColumn's. When a format has been defined for a column (for colors, horizontal... -
Collection Property problems with Image control ImageUrl property and URLBuilder
Been using reflector and examining what Microsoft does with the Rows property in the Table class. It looks like all of the items added to the rows... -
DataGrid ItemStyle is a textbox and doesn't update the datagrid datasource
I have a datagrid with two columns, the first a normal bound column, the second is a template column created from a bound column. For the... -
ItemStyle ForeColor on a datagrid
Hi, I have a datagrid whereby I specify the ForeColor for my ItemStyle to be #ff6600. However this does not change the color of the font to be...



Reply With Quote

