本文整理汇总了C#中System.Web.DynamicData.QueryableFilterRepeater类的典型用法代码示例。如果您正苦于以下问题:C# QueryableFilterRepeater类的具体用法?C# QueryableFilterRepeater怎么用?C# QueryableFilterRepeater使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QueryableFilterRepeater类属于System.Web.DynamicData命名空间,在下文中一共展示了QueryableFilterRepeater类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Page_Init
//引入命名空间
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Web.DynamicData;
public partial class QueryableFilterRepeaterSample : System.Web.UI.Page
{
protected MetaTable table;
protected void Page_Init(object sender, EventArgs e) {
DynamicDataManager1.RegisterControl(GridView1, true /*setSelectionFromUrl*/);
}
protected void Page_Load(object sender, EventArgs e) {
table = GridDataSource.GetTable();
Title = table.DisplayName;
// Disable various options if the table is readonly
if (table.IsReadOnly) {
GridView1.Columns[0].Visible = false;
}
}
// Handle the filter change event.
// This function resets the index of the page to display.
protected void OnFilterSelectionChanged(object sender, EventArgs e)
{
GridView1.PageIndex = 0;
}
}
开发者ID:.NET开发者,项目名称:System.Web.DynamicData,代码行数:40,代码来源:QueryableFilterRepeater
示例2:
//引入命名空间
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.DynamicData;
// Define the enumeration to apply
// to the OrderQty data field.
// This enumeration is used for filtering.
public enum QtyEnum
{
None = 0,
Small1 = 1,
Small2 = 2,
Small3 = 3,
Medium10 = 10,
Medium11 = 11,
Medium12 = 12,
Medium13 = 13,
Medium14 = 14,
Large21 = 21,
Large22 = 22,
Large23 = 23,
XLarge60 = 60,
XLarge70 = 70
}
[MetadataType(typeof(SalesOrderDetail_MD))]
public partial class SalesOrderDetail {
private class SalesOrderDetail_MD
{
// Qualify the OrderQty field
// with the applicable
// enumeration type.
[EnumDataType(typeof(QtyEnum))]
public object OrderQty { get; set; }
}
}
开发者ID:.NET开发者,项目名称:System.Web.DynamicData,代码行数:41,代码来源:QueryableFilterRepeater
注:本文中的System.Web.DynamicData.QueryableFilterRepeater类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论