I have some fields which are text and hence can have linefeeds, that makes some of the row as high as lines in the text are. Can this height be fixed? or the lines feeds removed (in the view) from it so it shows as a one-liner?
Here a screen shot: https://imgur.com/a/uAF0zje
Please check if you are using following CSS on your page. If yes then remove it to have it one liner.
Well, I wasn’t using that CSS, then I tried and neither with or without solves the issue. Screenshot with the CSS (whitout the CSS looks like in the previous screenshot): https://imgur.com/a/PdlS9OB
As you see, with the CSS all the rows look tall and the one with the long comment even taller.
This is a comment field, and can have line-feeds (the \r\n or carriage return + line feed), and is inserted by an external script, it receives from a textbox and then
$comment = htmlentities(filter_var($_POST['comment'], FILTER_SANITIZE_STRING), ENT_QUOTES, 'UTF-8');
$sql->bindParam(':comment', $comment, PDO::PARAM_STR); at the insert. If the comment doesn’t have any line feeds/carriage returns (that means pressing the enter key while writing the comment) then works as expected:
Hope we can find a solution.
BTW, happy workers day!
To regenerate case, Please email me your sql dump and grid code at [email protected].
It’s coming on new line only when your cell content contains <br>.
Otherwise \n or \r\n comes as it is, like “Test \r\n Test2”
Can you confirm what exactly is in your database?
You can use on_data_display event handler to remove new lines at the time of display.
Thanks Abu, it works as expected.
Do you think is it a issue with my database or is it a normal behaviour from textboxes and how enters behave?
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?