11
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
Title="中间面板" ShowBorder="false" ShowHeader="false" Layout="VBox">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="false" runat="server"
|
||||
BoxFlex="1" DataKeyNames="ID" AllowCellEditing="true" DataIDField="ProjectId"
|
||||
BoxFlex="1" DataKeyNames="ID" DataIDField="ProjectId"
|
||||
AllowSorting="true" SortField="ProjectId" SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowSelectEvent="true" EnableRowClickEvent="true"
|
||||
@@ -73,7 +73,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" CssClass="blockpanel" ShowBorder="true" ShowHeader="true" EnableCollapse="false" runat="server"
|
||||
DataKeyNames="HardTestReportId" AllowSorting="true" SortField="HardTestReportId"
|
||||
SortDirection="ASC" EnableCheckBoxSelect="true">
|
||||
SortDirection="ASC" OnSort="Grid2_Sort" EnableCheckBoxSelect="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server">
|
||||
<Items>
|
||||
|
||||
@@ -57,7 +57,14 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", ProjectId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
Grid2.DataSource = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
DataView view = dt.DefaultView;
|
||||
if (!string.IsNullOrEmpty(Grid2.SortField) && view.Count > 0)
|
||||
{
|
||||
view.Sort = String.Format("{0} {1}", Grid2.SortField, Grid2.SortDirection);
|
||||
}
|
||||
DataTable table = view.ToTable();
|
||||
Grid2.DataSource = table;
|
||||
Grid2.DataBind();
|
||||
Grid2.SelectAllRows();
|
||||
}
|
||||
@@ -93,10 +100,12 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
protected void Grid2_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
BindGrid1(this.Grid1.SelectedRowID);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 选择加载
|
||||
|
||||
Reference in New Issue
Block a user