1.隐藏GroupPanel表头

设置Run Design->OptionsView->ShowGroupPanel 设置为:false

2.隐藏列标题和左侧的Indicator

Run Design->OptionsView->ShowColumnHeaders

Run Design->OptionsView->ShowIndicator

2.gridview获取当前选中行:

   2.1获取当前行的索引:

int index = Convert.ToInt32(gridView1.FocusedRowHandle.ToString());

   2.2获取当前选中行单元格内的值:

string d =gridView1.GetRowCellDisplayText(i,col); //i代表行号,col代表标题
  		    string e =gridView1.GetFocusedRowCellValue("字段名");

  2.3选中多行

int[] rows =GridView1.GetSelectedRows(); //选中多行   
string aa=GridView1.GetRowCellDisplayText(rows[0],"列字段名").ToString();

2.4删除某一行

gridView1.DeleteRow(index);

2.5设置某列不可见

 gridView1.Columns["warehouse"].Visible = true;

3.gridview设定不可编辑:

gridcontrol -->gridview -->OptionsBehavior -->Editable=false 即可

4.设置选中行的颜色:

Run Design---->View---->Appearance----->FocusedRow------->BackColor

5.给奇偶行设置不同的颜色:

Run Design---->View---->Appearance----->OddRow------>BackColor

6.自动调整列宽

listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);//自动调整列宽
            listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);

//自动调整所有字段宽度
this.gridView1.BestFitColumns();

//调整某列字段宽度
this.gridView1.Columns[n].BestFit();

7.设置Ctrl+F的那个快捷搜索一直可见:

Run Desgin------>gridview1------>OptionsFind----->AlwaysVisiable----->true.

8.选中行时使focus的cell的颜色与其他列颜色保持一致

gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;

9.checkedit互斥

properties->radiogroupindex设置为同一个值

10.自动显示列筛选

Run Design-->View-->ShowAutoFiltersRow=true;