Hi All,
I have a requirement where after I export the grid to a excel, I need to make a few columns to be read only.
I actually have a functionality wherin the user exports the grid to a excel, makes changes to the excel and then imports back the data to the grid. All this works perfectly. Now i want to make a few columns read only so that the user cannot edit those columns.
Please help. Thanks in advance,
Bhagyashree
Looks like you want the Excel sheet columns read only?
If so you want to set the Locked state of the cells in question. Remember the Locked state is ignored if the Worksheet is not Protected so set that too.
Also there is a resolution order:
Cell formatting is associated with each cell, row, and column in a Worksheet. If a property of the cell format has a default value, the value of the previous format in resolution chain is used. The resolution priority is the following:
So you could set the Locked state on a Column but a Row or Cell can override that setting. The Locked setting.