Split value in one editor field to populate many db fields
Split value in one editor field to populate many db fields

Hi
I have 5 db fields that I merge into one editor field on the editor UI. How can I the read and split the content of this editor field to set my 5 db fields in turn? Many thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @dynasoft ,
Are you merging those fields as in this example? If not could you give more information, please.
Cheers,
Colin
Thanks. Yes I am using the same merging code in render.
DataTable has:
HTML:
Editor:
Server side:
I'm looking to use the data in ediyor field NotesBody and save it in the 5 db fields NotesBody1, NotesBody2... by splitting the data in chunks. Our db is structured that string db fields are limited to 255 chars, hence need to merge data for UI and then split data back for the db. Thanks.
I should be able to find a solution if I can read the value stored in editor field NotesBody from the server. All I find that deals with this is the server events like:
editor.PreEdit += (sender, e) => strTp = CommonUtilities.ToString(e.Values["NotesBody"]);
How can I modify this so I can read the e.Values["NotesBody"] and store this into a variable? Thanks.
Hi, I was on the right track as using a mix of the preedit event and e.Values gets me the data formatted correctly
Ah, glad you got it working!
C