• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
hhl_kf
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  .net

dev GridView常用属性,事件

摘要:一、属性1、GridControl属性 //允许拖拽行 gridControl1.AllowDrop = true;2、GridView属性 //不可编辑 gridView1.OptionsBehavior.Editab... 阅读全文
posted @ 2014-12-15 10:49 hhl_kf 阅读(1080) 评论(0) 推荐(0)
C# 获取当前路径方法

摘要://获取包含清单的已加载文件的路径或 UNC 位置。 public static string sApplicationPath = Assembly.GetExecutingAssembly ( ).Location; //result: X:\xxx\xxx\xxx.dll (.dll文件所在的目录+.dll文件名) //获取当前进程的完整路径,包含文件名(进程名)。 string str = this.GetType ( ).Assembly.Location; //result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名) //获取新的 Process 组件并将其与当前活动的进程关联的主模块的完整路径,包含文件名(进程名)。 string str = System.Diagnostics.Process.GetCurrentProcess ( ).MainModule 阅读全文
posted @ 2013-07-25 18:22 hhl_kf 阅读(1270) 评论(0) 推荐(0)
XtraTreeList行定位

摘要:DevExpress.XtraTreeList.TreeList treeList = new DevExpress.XtraTreeList.TreeList(); //绑定数据源 treeList.DataSource = dt; //记录当前选中节点 TreeListNode node = treeList.FocusedNode; //重新绑定数据源 treeList.DataSource = dt; //选中指定行 if (node != null) { //根据旧节点找到新节点,有三种方法: //treeList .FindNodeByID (int nodeID); //treeList .FindNodeByFieldValue (stri 阅读全文
posted @ 2013-05-28 20:17 hhl_kf 阅读(3658) 评论(0) 推荐(0)
dhtmlxGrid 添加行号

摘要:添加行号,效果如下: 二、设置属性 设置gridView属性:gridView1 .IndicatorWidth=30;或是在属性窗口中设置值。(可根据实际大小设置IndicatorWidth大小) 三、添加事件 private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) { if (e.Info.IsRowIndicator && e.RowHandle >= 0) { e.Info.DisplayText =( e.RowHandle+1).ToString(); } } 四、行号搞定。 当然也可以设置行号列,使用数据源绑定行号值。 阅读全文
posted @ 2013-03-06 13:54 hhl_kf 阅读(356) 评论(1) 推荐(0)
DevExpress.XtraReports打印

摘要:DevExpress.XtraReports打印时,可以表头表尾不变,在同一报表上打印多条数据;也可按数据源逐条打印成多张报表... 阅读全文
posted @ 2012-07-26 10:44 hhl_kf 阅读(1859) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3