Hi everyone!
How to display only 20-30 first characters from the textarea column in the grid.
I have no idea :/
greetings
Torin
You can check this demo: https://www.gridphp.com/demo/demos/integrations/readmore.php
Code: https://www.gridphp.com/demo/demos/integrations/readmore.phps
To check, put some long text by editing note column.
Thank you Abu!
It looks like that’s what I was looking for. I’m already working 🙂
greetings
Zbigniew
Hello it doesn’ t work for me. It display full text ever:
Any suggest?
$col = array();
$col[“title”] = “Nome”;
$col[“name”] = “name”;
$col[“editoptions”] = array(“size”=>20);
$col[“width”] = “50”;
$col[“editable”] = false;
$col[“sortable”] = false;
$cols_items_gest[] = $col;
Please share your full code for review. You can attach code here and paste link in question.
I’m unable to get the issue from your code. I think you have not tried using readmore plugin in this code.
To use this plugin, follow these steps referring this code: https://www.gridphp.com/demo/demos/integrations/readmore.phps
- Refer line 104-105, add formatter and unformat property to the column you want readmore option
- Include readmore.min.js file as on line 126
- Use onload event line 33 and JS callback function as on 139-152
- Add css onpage, line 133-137 and 158-164
This will give you this result: