diff --git a/FineUI_v6/FineUI.Examples/FineUI.Examples.csproj b/FineUI_v6/FineUI.Examples/FineUI.Examples.csproj index 1a78303..1ae3fd6 100644 --- a/FineUI_v6/FineUI.Examples/FineUI.Examples.csproj +++ b/FineUI_v6/FineUI.Examples/FineUI.Examples.csproj @@ -136,6 +136,7 @@ + @@ -1045,6 +1046,13 @@ grid_style_columnclass.aspx + + grid_style_rowcolor_lockcolumn.aspx + ASPXCodeBehind + + + grid_style_rowcolor_lockcolumn.aspx + grid_summary_scrollbar_flow.aspx ASPXCodeBehind diff --git a/FineUI_v6/FineUI.Examples/common/menu.xml b/FineUI_v6/FineUI.Examples/common/menu.xml index 43b3438..2562313 100644 --- a/FineUI_v6/FineUI.Examples/common/menu.xml +++ b/FineUI_v6/FineUI.Examples/common/menu.xml @@ -464,6 +464,8 @@ + + diff --git a/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor.aspx b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor.aspx index 708125b..4208af3 100644 --- a/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor.aspx +++ b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor.aspx @@ -68,7 +68,7 @@ $(grid.el.dom).find('.x-grid-item.highlight').removeClass('highlight'); $.each(highlightRows.getValue().split(','), function (index, item) { - if (item !== '') { + if (item) { var row = grid.getView().getNode(parseInt(item, 10)); $(row).addClass('highlight'); } @@ -97,10 +97,6 @@ }); - //// 页面AJAX回发后执行的函数 - //F.ajaxReady(function () { - // highlightRows(); - //}); diff --git a/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor.aspx.designer.cs b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor.aspx.designer.cs index 7b398a5..6877765 100644 --- a/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor.aspx.designer.cs +++ b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor.aspx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 +// +// This code was generated by a tool. // -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ namespace FineUI.Examples.data { @@ -13,56 +13,56 @@ namespace FineUI.Examples.data { public partial class grid_style_rowcolor { /// - /// form1 控件。 + /// form1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; /// - /// PageManager1 控件。 + /// PageManager1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUI.PageManager PageManager1; /// - /// Grid1 控件。 + /// Grid1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUI.Grid Grid1; /// - /// Label2 控件。 + /// Label2 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label Label2; /// - /// Button1 控件。 + /// Button1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUI.Button Button1; /// - /// highlightRows 控件。 + /// highlightRows control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUI.HiddenField highlightRows; } diff --git a/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx new file mode 100644 index 0000000..fb28050 --- /dev/null +++ b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx @@ -0,0 +1,107 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="grid_style_rowcolor_lockcolumn.aspx.cs" + Inherits="FineUI.Examples.data.grid_style_rowcolor_lockcolumn" %> + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+
+ 注:这个表格高亮选中了所有[入学年份]大于等于2006的数据行。 +
+
+ + +
+
+
+
+ + + + + + + + diff --git a/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx.cs b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx.cs new file mode 100644 index 0000000..80e9a63 --- /dev/null +++ b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Text; +using System.IO; + +namespace FineUI.Examples.data +{ + public partial class grid_style_rowcolor_lockcolumn : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindGrid(); + } + } + + #region BindGrid + private void BindGrid() + { + ViewState["UseDataSource1"] = true; + + DataTable table = DataSourceUtil.GetDataTable(); + + highlightRows.Text = ""; + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #endregion + + #region Grid1 + + protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) + { + // e.DataItem -> System.Data.DataRowView or custom class. + // e.RowIndex -> Current row index. + // e.Values -> Rendered html for each column of this row. + + DataRowView row = e.DataItem as DataRowView; + if (row != null) + { + //e.Values[1] = String.Format("Bound - {0}", row["MyValue"]); + int entranceYear = Convert.ToInt32(row["EntranceYear"]); + + if (entranceYear >= 2006) + { + highlightRows.Text += e.RowIndex.ToString() + ","; + } + } + } + + + #endregion + + #region Event + + protected void Button1_Click(object sender, EventArgs e) + { + DataTable table; + if (Convert.ToBoolean(ViewState["UseDataSource1"])) + { + ViewState["UseDataSource1"] = false; + table = DataSourceUtil.GetDataTable2(); + } + else + { + ViewState["UseDataSource1"] = true; + table = DataSourceUtil.GetDataTable(); + } + + // 重新绑定数据前,先清空高亮的行数据 + highlightRows.Text = ""; + + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #endregion + + } +} diff --git a/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx.designer.cs b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx.designer.cs new file mode 100644 index 0000000..d163103 --- /dev/null +++ b/FineUI_v6/FineUI.Examples/grid/grid_style_rowcolor_lockcolumn.aspx.designer.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUI.Examples.data { + + + public partial class grid_style_rowcolor_lockcolumn { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUI.PageManager PageManager1; + + /// + /// Grid1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUI.Grid Grid1; + + /// + /// Label2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Button1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUI.Button Button1; + + /// + /// highlightRows control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUI.HiddenField highlightRows; + } +} diff --git a/FineUI_v6/FineUI/release_history.txt b/FineUI_v6/FineUI/release_history.txt index 60d63bc..ccdffd4 100644 --- a/FineUI_v6/FineUI/release_history.txt +++ b/FineUI_v6/FineUI/release_history.txt @@ -29,6 +29,10 @@ FineUI 严格遵守 ExtJS 对开源软件的规定,不再内置 ExtJS 库, 发布历史 + -增加示例:表格控件->行与列样式->行样式(列锁定)。 + + + +2017-09-13 v6.1.0 -修正未激活选项卡中表格的getStore().sorters为null导致的问题(甘桂-9373)(碌云-21311)。 -增加示例:其他杂项->第三方组件->UEditor->UEditor(后台赋值)等四个示例。