问题
I'm working on a windows forms app and there is a Janus GridEx component with 3 columns. I don't want users to change the values in the first two columns but I can't find the way to make readonly or allowedit false for the first two columns and third column editable.
I've tried changing the editmode but no luck either... anyone out there knows how?
回答1:
Have you tried:
column.EditType = Janus.Windows.GridEX.EditType.NoEdit;
?
回答2:
If you change the column's Selectable property to false, the user will not be able to edit it. You can set this property in the designer or in code. Here is an example which locks down the id column:
GridEXColumn idColumn = gridEX1.RootTable.Columns["id"];
idColumn.Selectable = false;
来源:https://stackoverflow.com/questions/6225087/how-to-make-a-janus-gridex-column-readonly