2012年2月13日

读书笔记 UltraGrid(12)

摘要: 呈现数据1.使用未绑定列可通过UltraGridBand中的Columns来增加column。限制条件:必须有一个绑定的列!2.通常未绑定列是计算字段。例:band.Columns.Add("OrdrAmt1","金额");band.Columns["OrdrAmt1"].Formula = "[OrdrSqr]*[OrdrPrc]";需要注意的是如果使用了计算字段,则要增加UltraCalcManager如下:UltraCalcManager calc = new UltraCalcManager(this.ul 阅读全文

posted @ 2012-02-13 14:23 木人(我现在不是老大) 阅读(635) 评论(0) 推荐(0) 编辑

2012年2月12日

读书笔记 UltraGrid(11)

摘要: KeyActionMappings键盘映射ultragrid缺省的键盘映射可通过以下程序得到:DataTable dt=new DataTable();dt.Columns .Add("keyCode");dt.Columns .Add("actionCode");dt.Columns .Add("stateDisallowed");dt.Columns .Add("stateRequired");dt.Columns .Add("specialKeysDisallowed");dt.Colum 阅读全文

posted @ 2012-02-12 23:46 木人(我现在不是老大) 阅读(293) 评论(0) 推荐(0) 编辑

读书笔记 UltraGrid(10)

摘要: 关于绑定dataset1.如果DataSet中建立了关系,则ultragrid中自动以dataset中的关系展示层次性的数据。SqlDataAdapter da = new SqlDataAdapter("select * from customers;select * from pdctorders;select * from SaleContracts;", cnnstring);da.TableMappings.Add("Table", "客户");da.TableMappings.Add("Table1", 阅读全文

posted @ 2012-02-12 21:54 木人(我现在不是老大) 阅读(339) 评论(0) 推荐(0) 编辑

2012年2月11日

读书笔记 UltraGrid(9)

摘要: 关于SqlDataAdapter填充数据1. SqlDataAdapter da = new SqlDataAdapter("select * from customers", cnnstring);da.Fill(data);如果不指名源表名,则缺省为Table;2.public int Fill(DataSet dataSet,string srcTable)用于表映射的源表的名称。da.Fill(data,"客户");指定原表名为"客户",填充后datatable的名称也为"客户",这点有点奇怪呢。3.使用T 阅读全文

posted @ 2012-02-11 23:30 木人(我现在不是老大) 阅读(253) 评论(0) 推荐(0) 编辑

读书笔记 UltraGrid(8)

摘要: 设置某一列为只读this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Activation.ActivateOnly;选择后的缺省前景和背景色this.ultraGrid1.DisplayLayout.DefaultSelectedBackColor = Color.Azure;this.ultraGrid1.DisplayLayout.DefaultSelectedForeColor = Color.YellowGreen;使用dataset绑定。检索数据,建立table之间的关系。ultraGrid自动建立层次 阅读全文

posted @ 2012-02-11 20:39 木人(我现在不是老大) 阅读(371) 评论(0) 推荐(0) 编辑

读书笔记 UltraGrid(7)

摘要: ultragrid的缺省编辑状态允许删除和更新,不允许增加;缺省删除,可以选择行,然后按【delete】键;删除的提示信息,可通过下列方式修改:ResourceCustomizer rc = Infragistics.Win.UltraWinGrid.Resources.Customizer;rc.SetCustomizedString("DeleteMultipleRowsPrompt", "你选择删除{0}行!\n点击【是】则删除,否则点击【否】退出。");rc.SetCustomizedString("DeleteRowsMessageT 阅读全文

posted @ 2012-02-11 17:06 木人(我现在不是老大) 阅读(557) 评论(0) 推荐(0) 编辑

2012年2月10日

读书笔记 UltraGrid(6)

摘要: 资源汉化ResourceCustomizer rc = Infragistics.Win.UltraWinGrid.Resources.Customizer;rc.SetCustomizedString("RowFilterDropDown_Operator_Contains", "包含");如何知道资源名呢使用Reflector.exe,在resources中查看Infragistics.Win.UltraWinGrid.strings.resources,包括grid的所有字符串资源;常用的资源翻译如下: //过滤操作符 rc.SetCustomiz 阅读全文

posted @ 2012-02-10 14:58 木人(我现在不是老大) 阅读(382) 评论(0) 推荐(0) 编辑

读书笔记 UltraGrid(5)

摘要: 外观控制:行列线条控制:this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = UIElementBorderStyle.Dotted ;this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = UIElementBorderStyle.Dotted;行选择头格式:this.ultraGrid1.DisplayLayout.Override.RowSelectorHeaderStyle = RowSelectorHeaderStyle.SeparateElement;行头序号this 阅读全文

posted @ 2012-02-10 11:36 木人(我现在不是老大) 阅读(495) 评论(0) 推荐(0) 编辑

2012年2月9日

读书笔记 UltraGrid(4)

摘要: 控制行高和列宽缺省使用控件内部设定的行高和列宽,针对整个Grid所有的行和列;this.ultraGrid.DisplayLayout.Override.DefaultColWidth=-1this.ultraGrid.DisplayLayout.Override.DefaultRowHeight=-1那实际的行高和行宽并不是-1,究竟是多少呢?this.ultraGrid.Rows[0].Height,行高为20this.ultraGrid.DisplayLayout.Bands[0].Columns[0].Width,列宽为133也可以使用以下方法:this.ultraGrid1.Rows 阅读全文

posted @ 2012-02-09 10:58 木人(我现在不是老大) 阅读(608) 评论(0) 推荐(0) 编辑

2012年2月8日

读书笔记 UltraGrid(3)

摘要: 如何访问rowsultraGrid.Rows:访问顶层的所有行。如果启用了分组,则返回分组的所有行;也就是返回的既可能是UltraGridRow,也可能是UltraGridGroupByRow;ultraGrid.DisplayLayout.Rows:这个作用同ultraGrid.Rows,为什么要这样设计呢?UltraGridBand是没有Rows属性的,有点奇怪;ultraGrid1.DisplayLayout.Bands[0].Layout.RowsultraGrid1.DisplayLayout.Bands[0].Layout.Rows。。。这些都是同ultraGrid.Rows,因为 阅读全文

posted @ 2012-02-08 23:06 木人(我现在不是老大) 阅读(393) 评论(0) 推荐(0) 编辑

导航