Hi everyone,
This is my first time I encountered this in the data grid in livecode. Every time I saved the product description ( i just copied the data from the excel file) the display on the data grid it separate the other information. I don’t know if the data grid or the text field I will configured. hope you can help me thanks in advance.
After I saved the information, it displays like this.
But when I checked my database, it seems ok coz all the data were stored properly.
but when I tried to encode the data from the excel file it seems ok.
Data grid display
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Data grid display
Thank you & God Bless Everyone
Regards,
lemodizon
Regards,
lemodizon
Re: Data grid display
Hi lemodizon,
sorry the last two images are just to small to see what's going on.
But I suspect that there are RETURN/CRs in the "Product description"!
That will cuase the Datagrid to think these are new records and displays them in a new line
The Datagrid of type TABLE is only meant for displaying ONE line in its fields!
So just replace the CR with COMMA or any other character as delimiter other than TAB in the product description and that should do the trick.
Best
Klaus
sorry the last two images are just to small to see what's going on.
But I suspect that there are RETURN/CRs in the "Product description"!
That will cuase the Datagrid to think these are new records and displays them in a new line
The Datagrid of type TABLE is only meant for displaying ONE line in its fields!
So just replace the CR with COMMA or any other character as delimiter other than TAB in the product description and that should do the trick.
Best
Klaus
Re: Data grid display
What Klaus says (as always!)
If the text you're copying has a CR and/or LF in it, it will be treated as a new line of data instead of a cell with multiple lines.
You'd need to replace the 'return' in the text of the cell you want to copy with a character you can easily search for and replace and which won't be used for anything else, eg "§"
You can actually just leave the text like that but in fillInData hander convert it the "§" back to return when passing data to that field. Personally as i prefer to work with arrays, i'd convert that back on building up the array - then you don't have to worry about returns in your text for each cell...
If the text you're copying has a CR and/or LF in it, it will be treated as a new line of data instead of a cell with multiple lines.
You'd need to replace the 'return' in the text of the cell you want to copy with a character you can easily search for and replace and which won't be used for anything else, eg "§"
You can actually just leave the text like that but in fillInData hander convert it the "§" back to return when passing data to that field. Personally as i prefer to work with arrays, i'd convert that back on building up the array - then you don't have to worry about returns in your text for each cell...
Re: Data grid display
Hi Klaus,Klaus wrote: ↑Mon Jul 26, 2021 2:21 pmHi lemodizon,
sorry the last two images are just to small to see what's going on.
But I suspect that there are RETURN/CRs in the "Product description"!
That will cuase the Datagrid to think these are new records and displays them in a new line
The Datagrid of type TABLE is only meant for displaying ONE line in its fields!
So just replace the CR with COMMA or any other character as delimiter other than TAB in the product description and that should do the trick.
Best
Klaus
thanks it works. thanks for the information "that table on data grid meant for displaying ONE line in its field" I didn't know this. thanks again have a nice day.
Thank you & God Bless Everyone
Regards,
lemodizon
Regards,
lemodizon
Re: Data grid display
Hi Stam,stam wrote: ↑Mon Jul 26, 2021 2:46 pmWhat Klaus says (as always!)
If the text you're copying has a CR and/or LF in it, it will be treated as a new line of data instead of a cell with multiple lines.
You'd need to replace the 'return' in the text of the cell you want to copy with a character you can easily search for and replace and which won't be used for anything else, eg "§"
You can actually just leave the text like that but in fillInData hander convert it the "§" back to return when passing data to that field. Personally as i prefer to work with arrays, i'd convert that back on building up the array - then you don't have to worry about returns in your text for each cell...
Thanks for the post I will try this also fillInData handler. I also need to learn on how to use arrays in livecode it's in my list. thanks again have a nice day.
Thank you & God Bless Everyone
Regards,
lemodizon
Regards,
lemodizon