Dev Treelist控件显示行号

        #region 显示行号
        private void treeList1_CustomDrawNodeIndicator(object sender, DevExpress.XtraTreeList.CustomDrawNodeIndicatorEventArgs e)
        {
            DevExpress.XtraTreeList.TreeList tmpTree = sender as DevExpress.XtraTreeList.TreeList;
            DevExpress.Utils.Drawing.IndicatorObjectInfoArgs args = e.ObjectArgs as DevExpress.Utils.Drawing.IndicatorObjectInfoArgs;
            if (args != null)
            {
                int rowNum = tmpTree.GetVisibleIndexByNode(e.Node) + 1;
                args.DisplayText = rowNum.ToString();
            }
            e.ImageIndex = -1; 
        }
        #endregion


作者:jiankunking 出处:http://blog.csdn.net/jiankunking

上一篇:有意思!小小3D脚型扫描仪让鞋业全流程数据化


下一篇:开发者社区精选直播合集 | 物联网充电包