点击获取工具>>express
平台:服务器
产品:session
这些新的只读服务器模式组件是XPServerCollectionSource/XPInstantFeedbackSource和XPView 的混合,可与DevExpress Grid控件一块儿使用。工具
它们提供如下内容:设计
在将这些组件用做网格的数据源以前,请按如下方式配置它们:orm
C#对象
`xpServerModeView1.ObjectType = typeof(Order);
xpInstantFeedbackView1.ObjectType = typeof(Order);事件
var viewProperties = new ServerViewProperty[] {
new ServerViewProperty("Oid", SortDirection.Ascending, "[Oid]"),
new ServerViewProperty("OrderDate", SortDirection.None, "[OrderDate]"),
new ServerViewProperty("Customer", SortDirection.None, "[Customer.ContactName]"),
new ServerViewProperty("ProductName", SortDirection.None, "[ProductName]"),
new ServerViewProperty("Price", SortDirection.None, "[Price]"),
new ServerViewProperty("Quantity", SortDirection.None, "[Quantity]"),
new ServerViewProperty("TotalPrice", SortDirection.None, "[Quantity] * [Price]"),
new ServerViewProperty("Tax", SortDirection.None, "[Quantity] [Price] 0.13")
};
xpServerModeView1.Properties.AddRange(viewProperties);
xpInstantFeedbackView1.Properties.AddRange(viewProperties);`内存
C#get
`session = new Session(XpoDefault.DataLayer);
xpServerModeView1.ResolveSession += (s, e) => {
e.Session = session;
};
xpInstantFeedbackView1.ResolveSession += (s, e) => {
e.Session = session;
};`
C#
`xpInstantFeedbackView1.DismissSession += (s, e) => {IDisposable session = e.Session as IDisposable;if (session != null) {session.Dispose();}};`