Search code examples
c#gridex

Gridex filter readonly


the short version: Is there a way to set a column readonly without setting the filter cell readonly?

the long version I use a janus GridEx control to display a key with several values next to it (its for a localisation tool, the key is the English word and the values are other languages). The data is loaded into the gridex by using a datatable that I set as a datasource.

Some of the users are not allowed to edit the English keys. For those I set the EN column in the datatable to readonly before I bind it with the grid. This indeed makes the entire column readonly. This is more or less what I want with the exception of the fact that the filter cell is also set to readonly.


Solution

  • I had a bright moment so I'm able to answer my own question:

    gridLanguageData.RootTable.Columns["en"].FilterEditType = FilterEditType.TextBox;
    

    This re-enables the filter column after setting setting the column readonly.