Hi everyone,
in a javascript file on document ready
var workbook = new $.ig.excel.Workbook($.ig.excel.WorkbookFormat.excel2007);
now I want to set the format of a cell to TEXT, because if I cut and paste from excel, the value eg. 0675 writes in the grid 675
Another question Can I protect a value in a cell?
Thanks
Stefano
Hello Stefano,
Thank you for your response!
Have you also protected the worksheet?
Regards,Alexander
Hello Alex,
thank you for your answer, I want to lock/disable a column editing and i try this:
sheet.columns(3).cellFormat().locked(true);
also i try
sheet.rows(4).cellFormat().locked(true);
But if i selct with a double click a cell I can write text.
Can you help me?
Thx
Thank you for contacting the Infragistics support!
Both features you are asking about are supported in the igSpreadsheet control.
About setting the type of the cell format to text – you may do it from the UI – by right clicking the cell and selecting “Format cells”. Then you just need to select the desired category.
You may lock a cell in the same view “Format cells”, choosing the last tab – “Protection”. Note that locking cells has no effect until you protect the worksheet (https://www.igniteui.com/help/api/2018.2/ig.excel.WorksheetProtection).
The same functionality may be achieved programmatically – take a look at the API - https://www.igniteui.com/help/api/2018.2/ig.excel.IWorksheetCellFormat
Thank you once more for using Ignite UI!
Please let me know if you have any additional questions!
Best regards,
Alexander Marinov