Ejemplo n.º 1
0
 /// <summary>
 /// 绘制行号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
 {
     e.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
     if (e.Info.IsRowIndicator)
     {
         if (e.RowHandle >= 0)
         {
             int layerNum = gridView1.RowCount - e.RowHandle;
             e.Info.DisplayText = (gridView1.RowCount - e.RowHandle).ToString() + "【" + RegisterAction.GetLayerPrice(curRegionId, layerNum).ToString() + "】";
             //e.Info.DisplayText = (gridView1.RowCount - e.RowHandle).ToString(); // (e.RowHandle + 1).ToString();
         }
         else if (e.RowHandle < 0 && e.RowHandle > -1000)
         {
             e.Info.Appearance.BackColor = System.Drawing.Color.AntiqueWhite;
             e.Info.DisplayText          = "G" + e.RowHandle.ToString();
         }
     }
 }