Hi,
I need to have an excel worksheet with one column editable (say first column) and rest read only. My code is as below:
_worksheet.Protected =
true;
_worksheet.Columns[0].CellFormat.Locked = ExcelDefaultableBoolean.False
However, it does not work. Instead if I add this piece of code, Infragistics removes the first column compeltely from my worksheet.
Could you please help.
Regards
Pallavi
Setting the column width did solve my problem.
Thanks a lot for your help, really appreciate it.
Both the columns and rows are lazily created and the columns only exist to store non-default width and formatting information, so that is the only time they will be created. Rows are similar, but they also store the cells, so they will also be created when any cell within them has a value or non-default formatting. However, this had nothing to do with the issue here. I think the problem was that an invalid width of 0 was being written out for columns that had a format but a default width. If you also set the width of the columns being unlocked, you might be able to work around this issue.
I see one more reason why I could be getting this issue, though not very sure.
I think Infragistics does not automatically creates a column unlike a row when exporting data to a cell.
In my case, I see the column count as 1. Hence, I guess when applying the format to the column it does not work.
Thanks for your response. Will give it a try.
By using an earlier version of 11.1, I was able to reproduce this issue. It has already been reported and fixed (issue id 91555) in versions 10.3 and later. If you download the latest SR for version 11.1, your issue should be fixed.