DataGrid not displaying correctly in Opera 7.2

M

Martin Brown

I have a datagrid defined as follows:

<asp:datagrid id="dgSubmissionHistory" ShowHeader="True" ShowFooter="True"
BorderStyle="None"
BorderWidth="1px" runat="server" BorderColor="#CCCCCC"
BackColor="White" CellPadding="3" AutoGenerateColumns="False" Width="100%"
AllowSorting="True">
<SelectedItemStyle Font-Bold="True"
BackColor="#D8DCFE"></SelectedItemStyle>
<ItemStyle ForeColor="#000066" BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#0000CC"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="#d8dcfe"></FooterStyle>
<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
<Columns>
<asp:BoundColumn Visible="False" DataField="SubmissionID"
HeaderText="SubmissionHistoryID"></asp:BoundColumn>
<asp:ButtonColumn DataTextField="CurrentStatus"
SortExpression="CurrentStatus" HeaderText="Status"></asp:ButtonColumn>
<asp:ButtonColumn DataTextField="ApplicationType"
SortExpression="ApplicationType" HeaderText="Application
type"></asp:ButtonColumn>
<asp:ButtonColumn DataTextField="SubmittedDate"
SortExpression="SubmittedDate" HeaderText="Received"
DataTextFormatString=""></asp:ButtonColumn>
<asp:ButtonColumn DataTextField="ModifiedDate"
SortExpression="ModifiedDate" HeaderText="Modified"></asp:ButtonColumn>
</Columns>
</asp:datagrid>

When I display this in IE all looks fine the header is blue and the item
rows are white and gray. When I display it in Opera though, all the cells
have the same background color as the rest of the page. It seems that when
the DataGrid renders for IE it uses the STYLE attribute, however when it
renders it for Opera it uses the BGCOLOR attribute. The bgcolor attribute
however gets overridden by an entry in the sites css file. Seeing that Opera
supports the STYLE attribute does anyone know how to force the DataGrid to
use it?
 
M

Martin Brown

Thanks Teemu,

By adding the following to my web.config file, the problem is solved.

<configuration>
<!-- bits ommitted for clarity -->
<system.web>
<!-- bits ommitted for clarity -->

<browserCaps>
<filter>
<case match="Opera[
/](?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
<filter match="[5-9]" with="${major}">
tagwriter=System.Web.UI.HtmlTextWriter
</filter>
</case>
</filter>
</browserCaps>

</system.web>
</configuration>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top