Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 15th, 2009, 09:43 AM
Registered User
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Does GridView Have A Problem With Explorer 7?

Greetings,

I have been working on building some new webpages for my company. Most of the pages are using a GridView to show data. Some of the fields can get rather long so I have tried to have them set with a fixed width column. If I let the column wrap on it's own, it wraps on the longest word and the text column looks terrible. The odd part is that no matter what I seem to do to set the width, in Explorer 7 it always wraps the field on the longest word. But, if I run the same page in Firefox 3, it works fine.

I have looked at the source code generated for both Explorer and FireFox. They are basically identical. Both do contain a width setting for the specific column.

This is the definition of the gridbox in question. The field in question is the next to the last column - "Purpose". I have currently set the width to 3000 just so I can know when it actually takes effect in Explorer 7. Then I can resize it to what looks better.

Code:
            <asp:GridView ID="GrdTravel" runat="server" AllowSorting="True" AllowPaging="True"
                AutoGenerateColumns="False" DataSourceID="TravelData" EmptyDataText="** No Records To Display **" OnRowDataBound="GrdTravel_RowDataBound" ShowFooter="True" EnableViewState="False">
                <Columns>
                    <asp:BoundField DataField="DO_Num" HeaderText="DO Num" SortExpression="DO_Num">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Clin" HeaderText="Clin" SortExpression="Clin">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Account_Type" HeaderText="Account Type" SortExpression="Account_Type">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Div_Title" HeaderText="Div Title" SortExpression="Div_Title">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="CostPoint" HeaderText="CostPoint" SortExpression="CostPoint" FooterText="Total Amount:">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                        <FooterStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Total" HeaderText="Total" SortExpression="Total">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" FooterText="Total Records:">
                        <HeaderStyle Wrap="False" Width="150px" />
                        <ItemStyle Wrap="False" />
                        <FooterStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="To_From" HeaderText="To / From" SortExpression="To_From">
                        <HeaderStyle Wrap="False" />
                        <FooterStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Date_From" DataFormatString="{0:d}" HeaderText="Date From"
                        SortExpression="Date_From">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Date_To" DataFormatString="{0:d}" HeaderText="Date To"
                        SortExpression="Date_To">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DateReqRcvd" DataFormatString="{0:d}" HeaderText="Date Req Rcvd"
                        SortExpression="DateReqRcvd">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ToAp" DataFormatString="{0:d}" HeaderText="To Ap" SortExpression="ToAp">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ProcessedAp" DataFormatString="{0:d}" HeaderText="Processed Ap"
                        SortExpression="ProcessedAp">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="Paid" HeaderText="Paid" SortExpression="Paid">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:CheckBoxField>
                    <asp:CheckBoxField DataField="CancelledFlag" HeaderText="Cancelled" SortExpression="CancelledFlag">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:CheckBoxField>
                    <asp:CheckBoxField DataField="BTA" HeaderText="BTA" SortExpression="BTA">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:CheckBoxField>
                    <asp:BoundField DataField="BTA_Date" DataFormatString="{0:d}" HeaderText="BTA Date"
                        SortExpression="BTA_Date">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="AirFare" HeaderText="Air Fare" SortExpression="AirFare">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="ExptCon" HeaderText="Expt Con" SortExpression="ExptCon">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:CheckBoxField>
                    <asp:BoundField DataField="ExptConClrd" DataFormatString="{0:d}" HeaderText="Expt Con Clrd"
                        SortExpression="ExptConClrd">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ToGov" DataFormatString="{0:d}" HeaderText="To Gov" SortExpression="ToGov">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="GovApp" DataFormatString="{0:d}" HeaderText="Gov App"
                        SortExpression="GovApp">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="AppSent" DataFormatString="{0:d}" HeaderText="App Sent"
                        SortExpression="AppSent">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ClmRcvd" DataFormatString="{0:d}" HeaderText="Claim Rcvd"
                        SortExpression="ClmRcvd">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="EmpSigned" DataFormatString="{0:d}" HeaderText="Emp Signed"
                        SortExpression="EmpSigned">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="VouchApr" DataFormatString="{0:d}" HeaderText="Voucher Apr"
                        SortExpression="VouchApr">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="TripRptVer" DataFormatString="{0:d}" HeaderText="Trip Rpt Ver"
                        SortExpression="TripRptVer">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="IsForeignTvl" HeaderText="Foreign Tvl" SortExpression="IsForeignTvl">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:CheckBoxField>
                    <asp:BoundField DataField="Purpose" HeaderText="Purpose" SortExpression="Purpose" HtmlEncode="False" HtmlEncodeFormatString="False">
                        <HeaderStyle Width="3000px" Wrap="False" />
                        <ControlStyle Width="3000px" />
                        <FooterStyle Width="3000px" Wrap="False" />
                        <ItemStyle Width="3000px" Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Emp_ID" HeaderText="Emp ID" SortExpression="Emp_ID">
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                    </asp:BoundField>
                </Columns>
                <FooterStyle Wrap="True" />
            </asp:GridView>
The source that is generated by Explorer 7 for the header and the first line of the table is:

Code:
            <div>
        <table cellspacing="0" cellpadding="4" rules="all" border="1" id="GrdTravel" style="color:DarkGreen;background-color:#EDEDED;border-collapse:collapse;">
            <tr style="color:#E0E0E0;background-color:Blue;">
                <th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$DO_Num')" style="color:#E0E0E0;">DO Num</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Clin')" style="color:#E0E0E0;">Clin</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Account_Type')" style="color:#E0E0E0;">Account Type</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Div_Title')" style="color:#E0E0E0;">Div Title</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$CostPoint')" style="color:#E0E0E0;">CostPoint</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Total')" style="color:#E0E0E0;">Total</a></th><th scope="col" style="width:150px;white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Name')" style="color:#E0E0E0;">Name</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$To_From')" style="color:#E0E0E0;">To / From</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Date_From')" style="color:#E0E0E0;">Date From</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Date_To')" style="color:#E0E0E0;">Date To</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$DateReqRcvd')" style="color:#E0E0E0;">Date Req Rcvd</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ToAp')" style="color:#E0E0E0;">To Ap</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ProcessedAp')" style="color:#E0E0E0;">Processed Ap</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Paid')" style="color:#E0E0E0;">Paid</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$CancelledFlag')" style="color:#E0E0E0;">Cancelled</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$BTA')" style="color:#E0E0E0;">BTA</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$BTA_Date')" style="color:#E0E0E0;">BTA Date</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$AirFare')" style="color:#E0E0E0;">Air Fare</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ExptCon')" style="color:#E0E0E0;">Expt Con</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ExptConClrd')" style="color:#E0E0E0;">Expt Con Clrd</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ToGov')" style="color:#E0E0E0;">To Gov</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$GovApp')" style="color:#E0E0E0;">Gov App</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$AppSent')" style="color:#E0E0E0;">App Sent</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ClmRcvd')" style="color:#E0E0E0;">Claim Rcvd</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$EmpSigned')" style="color:#E0E0E0;">Emp Signed</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$VouchApr')" style="color:#E0E0E0;">Voucher Apr</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$TripRptVer')" style="color:#E0E0E0;">Trip Rpt Ver</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$IsForeignTvl')" style="color:#E0E0E0;">Foreign Tvl</a></th><th scope="col" style="width:3000px;white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Purpose')" style="color:#E0E0E0;">Purpose</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Emp_ID')" style="color:#E0E0E0;">Emp ID</a></th>
            </tr><tr>
                <td style="white-space:nowrap;">709</td><td style="white-space:nowrap;">0711</td><td style="white-space:nowrap;">TRAVEL</td><td style="white-space:nowrap;">Non Specific</td><td style="white-space:nowrap;">00320390.2709.07.11</td><td style="white-space:nowrap;">0.0000</td><td style="white-space:nowrap;">Kapr, Susan</td><td style="white-space:nowrap;">Hanscom, MA/Tampa, FL - CANCELLED</td><td style="white-space:nowrap;">1/5/2009</td><td style="white-space:nowrap;">1/10/2009</td><td style="white-space:nowrap;">12/19/08</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl00" type="checkbox" name="GrdTravel$ctl02$ctl00" checked="checked" disabled="disabled" /></span></td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl01" type="checkbox" name="GrdTravel$ctl02$ctl01" disabled="disabled" /></span></td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl02" type="checkbox" name="GrdTravel$ctl02$ctl02" checked="checked" disabled="disabled" /></span></td><td style="white-space:nowrap;">11/20/2008</td><td style="white-space:nowrap;">37.5000</td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl03" type="checkbox" name="GrdTravel$ctl02$ctl03" disabled="disabled" /></span></td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;">12/19/2008</td><td style="white-space:nowrap;">12/22/2008</td><td style="white-space:nowrap;">12/22/2008</td><td style="white-space:nowrap;">12/16/2008</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl04" type="checkbox" name="GrdTravel$ctl02$ctl04" disabled="disabled" /></span></td><td style="width:3000px;white-space:nowrap;">Conduct DIB 1.3 Engineering drop testing - TRIP CANCELED PER S. KAPR EMAIL ON 1/6.</td><td style="white-space:nowrap;">1400129</td>
            </tr><tr style="background-color:#CCFFCC;">
The source that is generated by FireFox for the header and the first line of the table is:

Code:
            <div>
		<table cellspacing="0" cellpadding="4" rules="all" border="1" id="GrdTravel" style="color:DarkGreen;background-color:#EDEDED;border-collapse:collapse;">
			<tr style="color:#E0E0E0;background-color:Blue;">
				<th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$DO_Num')" style="color:#E0E0E0;">DO Num</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Clin')" style="color:#E0E0E0;">Clin</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Account_Type')" style="color:#E0E0E0;">Account Type</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Div_Title')" style="color:#E0E0E0;">Div Title</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$CostPoint')" style="color:#E0E0E0;">CostPoint</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Total')" style="color:#E0E0E0;">Total</a></th><th scope="col" style="width:150px;white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Name')" style="color:#E0E0E0;">Name</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$To_From')" style="color:#E0E0E0;">To / From</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Date_From')" style="color:#E0E0E0;">Date From</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Date_To')" style="color:#E0E0E0;">Date To</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$DateReqRcvd')" style="color:#E0E0E0;">Date Req Rcvd</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ToAp')" style="color:#E0E0E0;">To Ap</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ProcessedAp')" style="color:#E0E0E0;">Processed Ap</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Paid')" style="color:#E0E0E0;">Paid</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$CancelledFlag')" style="color:#E0E0E0;">Cancelled</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$BTA')" style="color:#E0E0E0;">BTA</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$BTA_Date')" style="color:#E0E0E0;">BTA Date</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$AirFare')" style="color:#E0E0E0;">Air Fare</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ExptCon')" style="color:#E0E0E0;">Expt Con</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ExptConClrd')" style="color:#E0E0E0;">Expt Con Clrd</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ToGov')" style="color:#E0E0E0;">To Gov</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$GovApp')" style="color:#E0E0E0;">Gov App</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$AppSent')" style="color:#E0E0E0;">App Sent</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$ClmRcvd')" style="color:#E0E0E0;">Claim Rcvd</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$EmpSigned')" style="color:#E0E0E0;">Emp Signed</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$VouchApr')" style="color:#E0E0E0;">Voucher Apr</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$TripRptVer')" style="color:#E0E0E0;">Trip Rpt Ver</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$IsForeignTvl')" style="color:#E0E0E0;">Foreign Tvl</a></th><th scope="col" style="width:3000px;white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Purpose')" style="color:#E0E0E0;">Purpose</a></th><th scope="col" style="white-space:nowrap;"><a href="javascript:__doPostBack('GrdTravel','Sort$Emp_ID')" style="color:#E0E0E0;">Emp ID</a></th>
			</tr><tr>

				<td style="white-space:nowrap;">709</td><td style="white-space:nowrap;">0711</td><td style="white-space:nowrap;">TRAVEL</td><td style="white-space:nowrap;">Non Specific</td><td style="white-space:nowrap;">00320390.2709.07.11</td><td style="white-space:nowrap;">0.0000</td><td style="white-space:nowrap;">Kapr, Susan</td><td style="white-space:nowrap;">Hanscom, MA/Tampa, FL - CANCELLED</td><td style="white-space:nowrap;">1/5/2009</td><td style="white-space:nowrap;">1/10/2009</td><td style="white-space:nowrap;">12/19/08</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl00" type="checkbox" name="GrdTravel$ctl02$ctl00" checked="checked" disabled="disabled" /></span></td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl01" type="checkbox" name="GrdTravel$ctl02$ctl01" disabled="disabled" /></span></td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl02" type="checkbox" name="GrdTravel$ctl02$ctl02" checked="checked" disabled="disabled" /></span></td><td style="white-space:nowrap;">11/20/2008</td><td style="white-space:nowrap;">37.5000</td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl03" type="checkbox" name="GrdTravel$ctl02$ctl03" disabled="disabled" /></span></td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;">12/19/2008</td><td style="white-space:nowrap;">12/22/2008</td><td style="white-space:nowrap;">12/22/2008</td><td style="white-space:nowrap;">12/16/2008</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><span disabled="disabled"><input id="GrdTravel_ctl02_ctl04" type="checkbox" name="GrdTravel$ctl02$ctl04" disabled="disabled" /></span></td><td style="width:3000px;white-space:nowrap;">Conduct DIB 1.3 Engineering drop testing - TRIP CANCELED PER S. KAPR EMAIL ON 1/6.</td><td style="white-space:nowrap;">1400129</td>
			</tr><tr style="background-color:#CCFFCC;">
I hope that this is sufficient to help show what the problem is for why I can't get the column to wrap properly in Explorer 7. If you need other information, please let me know and I will try to supply it. For now, I am hoping that I am not working against an undocumented "feature" in Explorer 7 and that there is a simple setting that I have only not seen.

Thank you for your time.
 
Old April 15th, 2009, 02:58 PM
Registered User
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default GridView has problem in Explorer 8?

Greetings,

As an update to this question, I have found out that this problem also exists in Explorer 8. It does not want to keep the column width that I have set.

Thank you for your time.
 
Old April 15th, 2009, 07:14 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

The Gridview itself doesn't have a problem with IE. It's that IE and FireFox simply disagree on how to wrap the contents of a <td></td>.

With IE, if you want a table column to observe your desirted width, you must set the width explicitly on every cell in that column.

You can also try setting the width of the column only, and adding the following class to every cell:

Code:
 
.breakCell {
 
   word-wrap: break-word;
 
}
Let me know how that works out.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old April 16th, 2009, 09:21 AM
Registered User
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Still trying - same results

Greetings Lee Dumond,

Thank you for your suggestions on how to fix the problem and what to look for. I have checked the source and I do see a width value for the header, cells, and footer in the table that is being generated by the GridView. IE still does not want to take it. I had also turned off all word wraps I could find for that column. It still wraps. I had looked at the code you had suggested, but I could not figure out how to apply that to the GridView properly.

My apologies if I don't understand some things easily, I have not had any training in web design and have been working on what I could figure out on my own for the last several months.

I do feel that I must be missing something very simple here as I don't think that Microsoft would create a GridView that in turn creates a table with a specific column width and then not have it work in their own browser.

Is there some tool or program that can be used to help see what setting is causing Explorer to wrap the field that is overriding my settings in the GridView?

Thank you for your time and patience.




Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with executing some command on explorer 6+ Kayodeog BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 0 October 9th, 2008 08:08 AM
Problem adding a New View in Server Explorer taliesin VS.NET 2002/2003 2 March 21st, 2006 01:10 PM
Problem in running applets in Internet Explorer sharadagarwal BOOK: Beginning Java 2 1 June 12th, 2004 08:13 AM
grouping problem in explorer 5.50 jcarlier XSLT 2 April 25th, 2004 08:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.