首页 > 代码库 > webdatagrid 列只读

webdatagrid 列只读

webdatagrid 列只读在前台好设置

 

因为不好贴图 贴代码为

<ig:EditingCore AutoCRUD="false">

                    <Behaviors>

                        <ig:CellEditing>

                            <ColumnSettings>

                                <ig:EditingColumnSetting EditorID="WebDataGrid1_TextEditorProvider1" ColumnKey="item"/>

                                <ig:EditingColumnSetting ColumnKey="Data" ReadOnly="true" />

                            </ColumnSettings>

                        </ig:CellEditing>

                    </Behaviors>

                </ig:EditingCore>

如果用C#完成webdatagrid 的只读功能

本来我以为用webdatagrid.column[i].readonly=true 或者webdatagrid.column[i].enable=false

结果没有该属性,几经周折找到下面一句话完美解决问题

 

webdatagrid.Behaviors.EditingCore.Behaviors.CellEditing.Enabled = False

webdatagrid 列只读