點擊獲取工具>>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();}};`