中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當前位置: 首頁 > news >正文

梧州網(wǎng)站建設(shè)設(shè)計百度服務(wù)電話在線人工

梧州網(wǎng)站建設(shè)設(shè)計,百度服務(wù)電話在線人工,小公司做網(wǎng)站需要,微信公眾號手機網(wǎng)站開發(fā)此主題描述了如何在gridcontrol中的視圖模型和顯示定義總計和分組統(tǒng)計 在視圖模型中指定統(tǒng)計 1、創(chuàng)建 SummaryItemType 枚舉你想要在GridControl中顯示的統(tǒng)計類型: public enum SummaryItemType { Max, Count, None } 2、創(chuàng)建一個grid統(tǒng)計描述類 public class S…

此主題描述了如何在gridcontrol中的視圖模型和顯示定義總計和分組統(tǒng)計

在視圖模型中指定統(tǒng)計

1、創(chuàng)建 SummaryItemType 枚舉你想要在GridControl中顯示的統(tǒng)計類型:

public enum SummaryItemType { Max, Count, None }

2、創(chuàng)建一個grid統(tǒng)計描述類

public class Summary : BindableBase {public Summary(SummaryItemType type, string fieldname) {Type = type;FieldName = fieldname;}public SummaryItemType Type { get; }public string FieldName { get; }
}

3、在視圖模型中指定合計和分組統(tǒng)計集合

public class CustomersViewModel : ViewModelBase {public CustomersViewModel() {// ...TotalSummary = new ObservableCollection<Summary>() {new Summary(SummaryItemType.Count, nameof(Customer.Name)),new Summary(SummaryItemType.Max, nameof(Customer.Visits))};GroupSummary = new ObservableCollection<Summary>() {new Summary(SummaryItemType.Count, nameof(Customer.Name))};}// ...public ObservableCollection<Summary> TotalSummary { get; }public ObservableCollection<Summary> GroupSummary { get; }
}

如果你需要GridControl引用在TotalSummary和GroupSummary集合中的改變,這些集合必須實現(xiàn)INotifyCollectionChanged 接口

創(chuàng)建統(tǒng)計模板

1、指定一個統(tǒng)計類型(Min,Max,Count),設(shè)置SummaryItemBase.SummaryType屬性到SummaryItemType枚舉值。創(chuàng)建ObjectToObjectConverter來映射SummaryItemType枚舉值到SummaryItemType枚舉值:

<Window ... xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"><Window.Resources><dxmvvm:ObjectToObjectConverter x:Key="SummaryTypeConverter"><dxmvvm:MapItem Source="Max" Target="Max" /><dxmvvm:MapItem Source="Count" Target="Count" /><dxmvvm:MapItem Source="None" Target="None" /></dxmvvm:ObjectToObjectConverter></Window.Resources><!-- ... -->
</Window>

2、創(chuàng)建一個模板生成統(tǒng)計

使用SummaryTypeConverter去指定Converter參數(shù)對于SummaryItemBase.SummaryType屬性

使用DependencyObjectExtensions.DataContext附加屬性當你綁定到GridControl統(tǒng)計屬性。這個附加的屬性同步數(shù)據(jù)更新束縛屬性提高grid性能:
?

<Window.Resources><DataTemplate x:Key="SummaryTemplate"><ContentControl><dxg:GridSummaryItem FieldName="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).FieldName, RelativeSource={RelativeSource Self}}"SummaryType="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).Type, RelativeSource={RelativeSource Self}, Converter={StaticResource SummaryTypeConverter}}"/></ContentControl></DataTemplate>
</Window.Resources>

在GridControl中顯示視圖模型統(tǒng)計

1、綁定TotalSummarySource和GroupSummarySource屬性到總計和分組統(tǒng)計集合

2、設(shè)置TotalSummaryGeneratorTemplate和GroupSummaryGeneratorTemplate屬性到模板生成統(tǒng)計

3、設(shè)置DataViewBase.TotalSummaryPosition屬性到Top和Bottom顯示Total Summary Panel

<dxg:GridControl ...TotalSummarySource="{Binding TotalSummary}"GroupSummarySource="{Binding GroupSummary}"TotalSummaryGeneratorTemplate="{StaticResource SummaryTemplate}"GroupSummaryGeneratorTemplate="{StaticResource SummaryTemplate}"><dxg:GridControl.View><dxg:TableView TotalSummaryPosition="Bottom"/></dxg:GridControl.View>
</dxg:GridControl>

http://www.risenshineclean.com/news/33571.html

相關(guān)文章:

  • 做網(wǎng)站用什么字體字號seo技術(shù)優(yōu)化服務(wù)
  • wordpress換域名了 登陸不了五年級下冊數(shù)學優(yōu)化設(shè)計答案
  • 域名 備案 沒有網(wǎng)站嗎網(wǎng)絡(luò)營銷的有哪些特點
  • 怎么自己做網(wǎng)站嚇別人佛山seo聯(lián)系方式
  • 剛注冊公司怎么做網(wǎng)站seo案例分析100例
  • 云推廣關(guān)鍵詞優(yōu)化是怎么弄的
  • 公司網(wǎng)站的管理和維護uc瀏覽網(wǎng)頁版進入
  • 制作網(wǎng)站步驟新媒體營銷案例ppt
  • 網(wǎng)頁設(shè)計的動態(tài)網(wǎng)站怎么做騰訊企點官網(wǎng)下載
  • 前端和網(wǎng)站建設(shè)的區(qū)別友情手機站
  • 宜興建設(shè)局網(wǎng)站長沙seo行者seo09
  • wordpress采集處理樣式廣東優(yōu)化疫情防控措施
  • 做網(wǎng)站3個月搜索引擎營銷流程是什么?
  • 簡約風格網(wǎng)站代哥seo
  • 男和女做暖暖網(wǎng)站網(wǎng)絡(luò)銷售怎么找客戶
  • 做網(wǎng)站練手優(yōu)化大師電腦版
  • seo黑帽技術(shù)工具陜西seo顧問服務(wù)
  • 真人做爰網(wǎng)站怎么提交網(wǎng)址讓百度收錄
  • 做網(wǎng)站常用代碼向右浮動怎么寫凡科網(wǎng)怎么建網(wǎng)站
  • 有了 ftp服務(wù)器密碼 怎么改網(wǎng)站給我免費播放片高清在線觀看
  • 網(wǎng)站域名代辦百度搜索鏈接
  • 國外做的好的醫(yī)療網(wǎng)站網(wǎng)站域名服務(wù)器查詢
  • 怎么自己做個網(wǎng)站搜索引擎優(yōu)化論文
  • 做決定網(wǎng)站域名注冊后怎么使用
  • java做網(wǎng)站需要數(shù)據(jù)庫嗎站長之家音效素材
  • 100m的網(wǎng)站 數(shù)據(jù)庫seo快速排名優(yōu)化公司
  • 拓展培訓東莞網(wǎng)站建設(shè)東莞關(guān)鍵詞排名seo
  • 岳陽做網(wǎng)站哪家好企業(yè)網(wǎng)站制作哪家好
  • 深圳網(wǎng)站建設(shè)大公司好seo排名點擊器原理
  • html網(wǎng)站建設(shè)實錄免費b站推廣網(wǎng)站不