Hi,
if you add a Style to a cell containing a "\n" (which I am forced to use, since text wrap does not work either) the style won't apply.
To reproduce just add a radspreadsheet to a form
public Form1()
{
InitializeComponent();
Workbook workbook = new Workbook();
radSpreadsheet1.Workbook = workbook;
Worksheet worksheet = workbook.ActiveWorksheet;
CellStyle style = workbook.Styles.Add("HeaderStyle");
style.IsBold = true;
worksheet.Cells[0, 0].SetValue("first\ncell");
worksheet.Cells[0, 1].SetValue("second cell");
worksheet.Cells[0, 0, 0, 1].SetStyleName("HeaderStyle");
}
Regards,
Markus
Hello, Markus,
Thank you for clarifying this. I approved this bug report logged in our feedback portal. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item. Please follow this item in order to get notified when its status has changed.
I have also updated your Telerik Points.
I hope this information helps. If you have any other questions don't hesitate to contact me.
Regards,
Nadya
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Hi Nadya,
the first cell is not bold. This only happens (as far as I know) if you got a "\n" in your cell value.
Regards,
Markus
Hello, Markus,
Thank you for the provided code snippet. I used it in my test project. However, I didn't observe the undesired behavior and the style with "/n" seems to be correctly applied on two lines in the cell in the spreadsheet. I am providing my test project for your reference. Am I missing something?
Below is the result on my end:
Please let me know if you have additional questions.
Regards,
Nadya
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.