Hi,
I am using Infragistics 14.1. By default all the rows are of the same height in a webdatagrid. I have a requirement, where if the text in a column is large, I need to wrap it and increase row height for this particular row. While if text is smaller or there is no text then row height should be minimum. In summary I need to have variable row height for each row depending on content of the row.
Do we have override row size option in webdatagrid? Will that work in this scenario? Please advise.
Regards,
Atul
Hi Atul,
You should manipulate the 'white-space' attribute in this case and set it to 'normal' for example, like this:
<style> tbody.igg_Item { white-space: normal; } </style>
Please let me know if this works for you.
Hi Boris,
Thanks for your response. First off, it works in my case! However, if the text is continuous with no spaces in between then it does not wrap the text.
e.g. I have column width set to 30px and if this column has text ="ABCD EFGH" then it wraps the text and moves EFGH part to the next line, row height increases. But if the text is ABCDEFGH with no space between ABCD and EFGH, then it does not wrap and only ABCD portion of the text is visible (column width can contain only this much). Can we wrap such text depending on column width ?
Thanks!
I get what you mean and I believe that the following setup should work for the mentioned cases:
tbody.igg_Item { white-space: normal; word-wrap: break-word;}
Does that suit your needs?
Thanks a lot!
This worked for me.