UltraGrid的使用(一):经常使用的技术
2009-04-16 00:57
155 查看
原文:http://blog.csdn.net/szm220/archive/2007/07/28/1713683.aspx
对于Grid是我们在程序中最常用到的麻烦控件,他有很强大的功能,有时候为了一个小小属性就能实现的功能,可能你要研究半天,我就是这样。现在来总结一下可能会经常使用到的功能。
1。动态加载button,checkbox,dropdrow等控件。
ultraGrid1.DisplayLayout.Bands[0].Columns["button"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
ColumnStyle是列样式,它是个枚举类型,里面是各种常用的类型,TriStateCheckBox.,Edit,Button,.Edit.DropDownValidate,.DropDownList,.DropDownCalendar,.DropDown.,CheckBox.Button.。
添加button后,他的响应事件是ClickCellButton。
2。使某一列不能编辑。同上Antivatian也是枚举类型。
ultraGrid1.DisplayLayout.Bands[0].Columns["id"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
3。使某一单元格不能编辑
ultraGrid1.Rows[0].Cells[1].Activation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
4。获取点击或选中某一行的索引,并得到其中某一值
int i = this.ultraGrid1.ActiveRow.Index;
string id = this.ultraGrid1.Rows[i].Cells[0].Value.ToString().Trim();
5加载ColumnStyle没有的控件,如:progressbar等
ultraGrid1.DisplayLayout.Bands[0].Columns["progressbar"].EditorControl = new Infragistics.Win.UltraWinProgressBar.UltraProgressBar();
对于Grid是我们在程序中最常用到的麻烦控件,他有很强大的功能,有时候为了一个小小属性就能实现的功能,可能你要研究半天,我就是这样。现在来总结一下可能会经常使用到的功能。
1。动态加载button,checkbox,dropdrow等控件。
ultraGrid1.DisplayLayout.Bands[0].Columns["button"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
ColumnStyle是列样式,它是个枚举类型,里面是各种常用的类型,TriStateCheckBox.,Edit,Button,.Edit.DropDownValidate,.DropDownList,.DropDownCalendar,.DropDown.,CheckBox.Button.。
添加button后,他的响应事件是ClickCellButton。
2。使某一列不能编辑。同上Antivatian也是枚举类型。
ultraGrid1.DisplayLayout.Bands[0].Columns["id"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
3。使某一单元格不能编辑
ultraGrid1.Rows[0].Cells[1].Activation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
4。获取点击或选中某一行的索引,并得到其中某一值
int i = this.ultraGrid1.ActiveRow.Index;
string id = this.ultraGrid1.Rows[i].Cells[0].Value.ToString().Trim();
5加载ColumnStyle没有的控件,如:progressbar等
ultraGrid1.DisplayLayout.Bands[0].Columns["progressbar"].EditorControl = new Infragistics.Win.UltraWinProgressBar.UltraProgressBar();
相关文章推荐
- UltraGrid的使用(一):经常使用的技术
- Java开发中经常使用到的几种WebService技术实现方案
- Java开发中经常使用到的几种WebService技术实现方案
- Java开发中经常使用到的几种WebService技术实现方案
- Java开发中经常使用到的几种WebService技术实现方案
- JAVA EE 项目经常使用知识 之AJAX技术实现select下拉列表联动的两种使用方法(让你真正理解ajax)
- 前后台交互经常使用的技术汇总(后台:Java技术,前台:Js或者Jquery)
- mybatis系列技术之二 开发中经常使用的
- 我听说编程语言,经常使用的是其中20%的技术
- 日常工作经常使用到的脚本或技术
- [阿里Hao]Android无线开发的几种经常使用技术
- Java开发中经常使用到的几种WebService技术实现方案
- 使用Java ME技术开发手机密码管理软件
- 第02天实战技术(11):static和const联合使用
- 学习Ethereum需要使用的工具以及技术
- Android DataBinding数据绑定技术在传统ListView中的使用简例
- Java中经常使用缓存Cache机制的实现
- rss技术,使用java解析xml
- Android中Java反射技术的使用示例
- JavaEE:Eclipse开发工具的相关使用和XML技术