我开发了一个网格,在网格中至少显示50行,有时需要上下滚动。我在Visual Studio 2008上开发了这个,C#作为代码,并且正在IE上测试它。当我发布它时,它仍适用于IE,但不适用于其他浏览器。我不能滚动了。我需要在我的CSS上更改某些内容吗?
这是我的标记:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewGenericOnlineReport.aspx.cs" Inherits="CamstarReportPortal.WebForms.OnlineQuery.NewGenericOnlineReport" MasterPageFile="~/Common/SiteMaster.Master" %>
<%@ Register Assembly="multiColDD_List" Namespace="multiColDD_List" TagPrefix="ksj" %>
<%@ Register Assembly="multiColDD_List.DropDowns" Namespace="multiColDD_List.DropDowns"
TagPrefix="ksj" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="contentMain" runat="server" ContentPlaceHolderID="cphContent">
<link rel="stylesheet" type="text/css" href="../../Scripts/CSS/myStyle.css" />
<div>
<h1>
Online Query
</h1>
</div>
<div>
<table>
<tr>
<td class="label">
Query Name:
</td>
<td>
<table>
<tr>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" Height="24px" Width="343px"
DataSourceID="sqldsUserQuery" DataTextField="USERQUERYNAME"
DataValueField="USERQUERYNAME" AutoPostBack="True" AppendDataBoundItems="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem Text="" Value=""></asp:ListItem>
</asp:DropDownList>
<%--<asp:DropDownList ID="DropDownList1" Enabled="false" Width="400px" runat="server" AutoPostBack="true">
</asp:DropDownList>
<asp:DropDownExtender runat="server" ID="popupdropdown" DropDownControlID="pnlGrid" TargetControlID="DropDownList1">
</asp:DropDownExtender>
<asp:Panel runat="server" ID="pnlGrid" Style="display: none; visibility: hidden">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="UserQueryID,USERQUERYNAME" DataSourceID="sqldsUserQuery" style="table-layout:fixed;"
GridLines="None"
CssClass="mGrid"
AlternatingRowStyle-CssClass="alt" Width="70%">
<Columns>
<asp:BoundField DataField="UserQueryName" HeaderStyle-Width="10%"
ItemStyle-Width="10%" FooterStyle-Width="10%" HeaderText="UserQueryName"
SortExpression="UserQueryName" >
<FooterStyle Width="10%" />
<HeaderStyle Width="10%" />
<ItemStyle Width="10%" />
</asp:BoundField>
<asp:BoundField DataField="Description" HeaderStyle-Width="10%"
ItemStyle-Width="10%" FooterStyle-Width="10%" HeaderText="Description"
SortExpression="Description" >
<FooterStyle Width="10%" />
<HeaderStyle Width="10%" />
<ItemStyle Width="10%" />
</asp:BoundField>
<asp:TemplateField HeaderStyle-Width="10%" ItemStyle-Width="10%" FooterStyle-Width="10%">
<ItemTemplate>
<asp:LinkButton CommandName="Select" CommandArgument='<%# Eval("UserQueryName") %>' ID="LinkButton1" OnClick="LinkButton1_Click"
runat="server">Select</asp:LinkButton>
</ItemTemplate>
<FooterStyle Width="10%" />
<HeaderStyle Width="10%" />
<ItemStyle Width="10%" />
</asp:TemplateField>
</Columns>
<AlternatingRowStyle CssClass="alt" />
</asp:GridView>
</asp:Panel>--%>
</td>
<td>
<asp:Button ID="cmdSearch" runat="server" Text="Search"
onclick="cmdSearch_Click" />
</td>
<td>
<asp:Button ID="cmdExport" runat="server" Text="Export"
onclick="cmdExport_Click" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td class="label">
Description:
</td>
<td>
<asp:TextBox ID="txtBoxDescription" runat="server" TextMode="MultiLine"
Width="99%" ReadOnly="True" Rows="3"></asp:TextBox>
</td>
</tr>
<tr>
<td class="label" valign="top">
Parameters
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvParameters" runat="server" AutoGenerateColumns="false" style="table-layout:fixed;"
GridLines="None"
CssClass="mGrid"
CellPadding="0" OnRowDataBound="gvParameters_RowDataBound"
AlternatingRowStyle-CssClass="alt">
<Columns>
<asp:BoundField DataField="userqueryparametername" HeaderStyle-Width="10%" HeaderStyle-CssClass = "hideGridColumn" ItemStyle-CssClass="hideGridColumn"
ItemStyle-Width="10%" FooterStyle-Width="10%" HeaderText="Parameter Name"
SortExpression="userqueryparametername" >
<FooterStyle Width="10%" />
<HeaderStyle Width="10%" />
<ItemStyle Width="10%" />
</asp:BoundField>
<asp:BoundField DataField="ParameterName" HeaderStyle-Width="10%"
ItemStyle-Width="10%" FooterStyle-Width="10%" HeaderText="Parameter Name"
SortExpression="ParameterName" >
<FooterStyle Width="10%" />
<HeaderStyle Width="10%" />
<ItemStyle Width="10%" />
</asp:BoundField>
<asp:TemplateField HeaderText="Parameter Value" HeaderStyle-Width="10%" ItemStyle-Width="10%" FooterStyle-Width="10%">
<ItemTemplate>
<asp:TextBox ID="txtParamValue" CssClass="text" Font-Size="Small" Text=' <%# Eval("DEFAULTVALUE").ToString() %>' runat="server" Width="97%"></asp:TextBox>
</ItemTemplate>
<FooterStyle Width="10%" />
<HeaderStyle Width="10%" />
<ItemStyle Width="10%" />
</asp:TemplateField>
</Columns>
<AlternatingRowStyle CssClass="alt" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</div>
<div>
<asp:GridView ID="GridView1" runat="server" style="table-layout:fixed;"
GridLines="None" OnPageIndexChanging="GridView1_PageIndexChanging"
CssClass="mGrid" OnDataBound="GridView1_DataBound" OnRowDataBound="GridView1_RowDataBound"
AlternatingRowStyle-CssClass="alt" AllowPaging="true" PagerStyle-CssClass="pgr"
Width ="100%" PageSize="50">
<PagerSettings Position="TopAndBottom" />
<PagerStyle CssClass="pgr" />
<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
</asp:GridView>
</div>
<div>
<asp:SqlDataSource
ID="sqldsUserQuery"
runat="server"
ConnectionString="<%$ ConnectionStrings:CamstarOLTP %>"
ProviderName="<%$ ConnectionStrings:CamstarOLTP.ProviderName %>"
SelectCommand="SELECT uq.userqueryname
,REPLACE(uq.description,'ISRPT|','')description
,uq.querytext
,uq.userqueryid
FROM userquery uq
WHERE uq.objectcategory = 'ONLINEQUERY' AND SUBSTR(uq.description,0,5) = 'ISRPT'
ORDER BY uq.userqueryname">
</asp:SqlDataSource>
<asp:SqlDataSource
ID="SqlDataSource1"
runat="server"
ConnectionString="<%$ ConnectionStrings:CamstarOLTP %>"
ProviderName="<%$ ConnectionStrings:CamstarOLTP.ProviderName %>"
SelectCommand="SELECT uq.userqueryname
,REPLACE(uq.description,'ISRPT|','')description
,uq.querytext
,uq.userqueryid
FROM userquery uq
WHERE uq.objectcategory = 'ONLINEQUERY' AND SUBSTR(uq.description,0,5) = 'ISRPT'
AND uq.userqueryname = :que
ORDER BY uq.userqueryname">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="que"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource
ID="sqldsQueryParams"
runat="server"
ConnectionString="<%$ ConnectionStrings:CamstarOLTP %>"
ProviderName="<%$ ConnectionStrings:CamstarOLTP.ProviderName %>"
SelectCommand="SELECT uqp.displaytext ParameterName
,uqp.userqueryparametername
,uqp.defaultvalue
,uqp.dynamicvalue
,uqp.paramsequence
,uqp.useforblockrows
,uqp.userqueryid
FROM userqueryparameter uqp
WHERE uqp.userqueryid = :queryid
ORDER BY uqp.paramsequence">
<SelectParameters>
<asp:ControlParameter ControlID="hfQueryID" Name=":queryid" PropertyName="Value" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="sqldsQueryResult"
runat="server"
ConnectionString="<%$ ConnectionStrings:CamstarODS %>"
ProviderName="<%$ ConnectionStrings:CamstarODS.ProviderName %>">
</asp:SqlDataSource>
<asp:HiddenField ID="hfQueryID" runat="server" />
<asp:HiddenField ID="hfQueryScript" runat="server" />
<asp:HiddenField ID="hfIndex" runat="server" />
</div>
<!--<div>
<script type="text/javascript">
function thirty_pc() {
var height = $(window).height();
var thirtypc = (100 * (height - 405)) / 100;
thirtypc = parseInt(thirtypc) + 'px';
$("#divContent").css('height', thirtypc);
}
$(document).ready(function() {
thirty_pc();
$(window).bind('resize', thirty_pc);
});
</script>
</div>-->
</asp:Content>
谢谢!