#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