ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2017-02-12 11:13:50

adamcrowe
Member
Registered: 2016-08-21
Posts: 21

Editing RichText Cells

Hi Jing,

As always, thank you for this great control and your support!

Question about a RichText cell please - is it possible to edit the paragraphs after some text has already been added? For example, can I change the font size of all the text inside a RichText cell?

I had requests of supporting multi-line text in cells so I've tried detecting if an Environment.NewLine is present in the e.NewData at AfterEdit event, and if it is, I convert the cell to a RichText and iterate through each line in the new text. This part works well, but now I'd like to make the cell "backwards compatible" with all the other editing functions like changing size, font, colour, etc.

Any help will be most appreciated!

Adam

Offline

#2 2017-03-03 13:49:37

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Editing RichText Cells

Hi Adam,

I am sorry for my late reply, and sorry that currently it is impossible to edit a rich format text inside cell, that requires a rich format supported text-box editor.

And ReoGrid currently has not a good compatibility with rich format text in edit-mode.

An alternative plan is to use standard .NET rich text box in a popped up dialog, edit the text and send back it into the cell, it requires you convert the text between RTF format and ReoGrid rich format and it's not a good user experienced way.

I think you already do the right thing 'I convert the cell to a RichText and iterate through each line in the new text. This part works well'.

but 'to make the cell "backwards compatible" with all the other editing functions like changing size, font, colour, etc' is a hard and big job, it requires many things to be done. I suggest you to use .NET standard rich-format text box, read the RTF format, and create ReoGrid rich format text repeatedly after every edit.

Jing

Last edited by Jingwood (2017-03-03 13:49:46)

Offline

Board footer

Powered by FluxBB