<p>1.隐藏最上面的GroupPanel</p>
<p> gridView1.OptionsView.ShowGroupPanel=false;</p>
<p>2.得到当前选定记录某字段的值</p>
<p> sValue=Table.Rows[gridView1.FocusedRowHandle][FieldName].ToString();</p>
<p>3.数据只读</p>
<p> gridView1.OptionsBehavior.Editable=false;</p>
<p>4.不显示MasterDetailView</p>
<p>gridView1.OptionsDetail.EnableMasterViewMode=false;</p>
<p>5.修改最上面的GroupPanel内容</p>
<p>gridView1.GroupPanelText="柳生飘絮";</p>
<p>6.数据绑定:</p>
<p>FieldName --数据库的字段名称</p>
<p>7.读写拷贝权限设置</p>
<p>ColumnView.Editable<br> This property returns a value of the <a><font color="#002c99">ColumnViewOptionsBehavior.Editable</font></a> option<br> 不可写<br>ColumnViewOptionsBehavior.Editable<br> Gets or sets whether end users are allowed to invoke cell editors<br> 可读可写<br><br>OptionsColumn.AllowEdit<br> Gets or sets whether end users are allowed to invoke editors for the column's cells.<br> 可读可写<br> 只有ColumnViewOptionsBehavior.Editable = True设置OptionsColumn.AllowEdit才有意义<br><br>OptionsColumn.ReadOnly<br> Gets or sets whether end-users are prevented from editing the column's cell values.<br> 可读可写<br></p>
<p>If the <b>ReadOnly</b> property is set to <b>true</b>, the cell
values of columns cannot be modified by end-users. In this case cell
editors can be invoked but end users can only select and copy an
editor's content. This option is not in effect if the column's <a><font color="#002c99">AllowEdit</font></a> or the view's <a><font color="#002c99">ColumnView.Editable</font></a> option is disabled.</p>
Cell values can still be modified in code using the <a><font color="#002c99">ColumnView.SetRowCellValue</font></a> method regardless of the <b>ReadOnly</b> property's setting.<br><br>只读不可拷贝:<br> ColumnViewOptionsBehavior.Editable = False<br><br>只读可拷贝:<br> ColumnViewOptionsBehavior.Editable = True<br> OptionsColumn.AllowEdit = True<br> OptionsColumn.ReadOnly = True<br><br>可编辑:<br> ColumnViewOptionsBehavior.Editable = True<br> OptionsColumn.AllowEdit = True<br> OptionsColumn.ReadOnly = False<br><br>
<p> gridView1.OptionsView.ShowGroupPanel=false;</p>
<p>2.得到当前选定记录某字段的值</p>
<p> sValue=Table.Rows[gridView1.FocusedRowHandle][FieldName].ToString();</p>
<p>3.数据只读</p>
<p> gridView1.OptionsBehavior.Editable=false;</p>
<p>4.不显示MasterDetailView</p>
<p>gridView1.OptionsDetail.EnableMasterViewMode=false;</p>
<p>5.修改最上面的GroupPanel内容</p>
<p>gridView1.GroupPanelText="柳生飘絮";</p>
<p>6.数据绑定:</p>
<p>FieldName --数据库的字段名称</p>
<p>7.读写拷贝权限设置</p>
<p>ColumnView.Editable<br> This property returns a value of the <a><font color="#002c99">ColumnViewOptionsBehavior.Editable</font></a> option<br> 不可写<br>ColumnViewOptionsBehavior.Editable<br> Gets or sets whether end users are allowed to invoke cell editors<br> 可读可写<br><br>OptionsColumn.AllowEdit<br> Gets or sets whether end users are allowed to invoke editors for the column's cells.<br> 可读可写<br> 只有ColumnViewOptionsBehavior.Editable = True设置OptionsColumn.AllowEdit才有意义<br><br>OptionsColumn.ReadOnly<br> Gets or sets whether end-users are prevented from editing the column's cell values.<br> 可读可写<br></p>
<p>If the <b>ReadOnly</b> property is set to <b>true</b>, the cell
values of columns cannot be modified by end-users. In this case cell
editors can be invoked but end users can only select and copy an
editor's content. This option is not in effect if the column's <a><font color="#002c99">AllowEdit</font></a> or the view's <a><font color="#002c99">ColumnView.Editable</font></a> option is disabled.</p>
Cell values can still be modified in code using the <a><font color="#002c99">ColumnView.SetRowCellValue</font></a> method regardless of the <b>ReadOnly</b> property's setting.<br><br>只读不可拷贝:<br> ColumnViewOptionsBehavior.Editable = False<br><br>只读可拷贝:<br> ColumnViewOptionsBehavior.Editable = True<br> OptionsColumn.AllowEdit = True<br> OptionsColumn.ReadOnly = True<br><br>可编辑:<br> ColumnViewOptionsBehavior.Editable = True<br> OptionsColumn.AllowEdit = True<br> OptionsColumn.ReadOnly = False<br><br>