首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  cxGrid使用技巧

摘要:dxSkinController可以在运行时动态调入皮肤,不用在设计期Use一大串文件,把要用的皮肤用安装程序自带的Skin Editor编辑一个SkinRes文件,然后在程序中动态调入就可以了。uses dxSkinsDefaultPainters;procedure TForm1.FormCreate(Sender: TObject);begincxComboBox1.Properties.Items.Clear;dxSkinsUserSkinPopulateSkinNames(ExtractFilePath(ParamStr(0))+'\bsSkins.skinres', 阅读全文

posted @ 2011-04-01 13:31 colincode 阅读(1285) 评论(0) 推荐(0) 编辑

摘要:1、要使打印预览有office风格 要引用上dxPSPrVwRibbon。2、保存控件属性和还原属性(可用于保存打印设置)procedure TfmFtpUpdater.PropertiesStore;Var AStoreComponent: TcxPropertiesStoreComponent;begin try cxPropertiesStore1.StorageName := ExtractFilePath(ParamStr(0)) + 'options.ini'; cxPropertiesStore1.StorageType := stIniFile; AStoreC 阅读全文

posted @ 2011-03-25 15:02 colincode 阅读(642) 评论(0) 推荐(0) 编辑

摘要:在cxTreeList的OnClick的事件下面,获取节点为ClickNode,然后1.向上移动ClickNode.MoveTo(ClickNode.getPrevSibling,tlamInsert);2.向下移动//在cxTreeList 的OnClick 的事件下面,获取节点为ClickNode,然后1.向上移动 ClickNode.MoveTo(ClickNode.getPrevSibling,tlamInsert);2.向下移动 //方法是对象的下一个节点上移就对了 ClickNode.getNextSibling.MoveTo(ClickNode.getNextSibling.ge 阅读全文

posted @ 2011-03-19 21:30 colincode 阅读(1627) 评论(0) 推荐(0) 编辑

摘要:1 数据集(TDACDSDataTable)得先有Lookup字段,为此先创建一个字段FieldLookup。 2 在FieldLookup(TDAFile)中,设定属性 Lookup = True LookupSource = 需要查找的数据源 LookupKeyFileds = 关联字段 LookupResultField = 需要显示的字段 KeyFields = 主键字段 3 在cxGri... 阅读全文

posted @ 2010-08-14 14:48 colincode 阅读(1683) 评论(1) 推荐(0) 编辑

摘要:其实这个方法就是cxGrid范例中提供的,原范例在CellLevelMultiselectDemo目录下把cxGridView里OptionsView选项中的两项修改成如下 OptionsView.Indicator = True OptionsView.IndicatorWidth = 40//宽度在customDrawIndicatorCell事件中填写procedure TForm1.cxG... 阅读全文

posted @ 2010-08-14 14:45 colincode 阅读(1889) 评论(0) 推荐(0) 编辑

摘要:1、设置斑马线 很简单设置一个属性而已在TcxGridDBBandedTableView.Styles属性中有 ContentEven(奇数行风格) 和 ContentOdd (偶数行风格) ,设定一下风格就好了。2、根据记录内容更改字体颜色参考范例CustomDrawTableViewDemo,主要在TcxGridDBBandedTableView.OnCustomDrawCell事件中实现。如... 阅读全文

posted @ 2010-08-14 14:44 colincode 阅读(1240) 评论(0) 推荐(0) 编辑

摘要:小技巧:用代码展开/收缩主从结构 Self.tvDepartment.ViewData.Expand(True); Self.tvDepartment.ViewData.Collaspe(True); 注:tvDepartment为主表对应的TableView技巧二:在内置右键菜单的后面增加菜单项 首先应在Form上加一个cxGridPopupMenu控件 以启用右键菜单 UseBuild... 阅读全文

posted @ 2010-08-14 14:43 colincode 阅读(3044) 评论(0) 推荐(0) 编辑

摘要:1 在TcxGridDBTableView中,设定属性 NewItemRow.Visible = True2 在cxgrid中输入数据怎样回车换行 在TcxGridDBTableView中 将属性OptionsBehavior.FocusFirstCellOnNewRecord = True OptionsBehavior.GoToNextCellOnEnter = True OptionsB... 阅读全文

posted @ 2010-08-14 14:35 colincode 阅读(2302) 评论(0) 推荐(0) 编辑