Can I know how I can set the column width of Utlragrid to fit the contents automatically so that the user doesn't have to manually adjust the column width to view the full content please.
Use the PerformAutoResize method on the column.
Or, if you have the latest version, you can avoid looping through each column and use PerformAutoResizeColumns on the grid's DisplayLayout.
I tried with the PerformAutoResizeColumns on the DisplayLayout but the column size is still too big, I have to manually double-click on the column and it resize to the smallest possible. Is there away to do this programmatically?
Thanks.
I'm using UltraWebGrid v5.1.20051.1090. I know is rather old, but this is what we got and what we need to deal with for now.
I am in need of doing the same thing but when the text wraps. How can I make the row resize its height automatically when the text is too long and wraps?
I don't want the column's width to be auto-resized. That's why I set it to wrap. I only need the row's height to resize if there is a cell in that row that has text wrapped, so that the user can read the whole text without having to resize the row manually.
Thanks in advance.