Hi all,

I know that this issue has been brought several times in this forum 
but as far as I read there's no solution to this yet.

Basically, there are 2 things that I want to do:
1. I would like the dataGridColumn width to expand to its longest 
string. 
2. This should only happen when the grid is displayed on the 1st time.

Way that I was doing to tackle the issue:
- I made a custom DataGridColumn that enables me to calculate the 
longest string length (fyi,I don't know how to determine the pixel 
size so I just use some number <-- if you know how to get the pixel 
size, please let me know) by inspecting the string whenever 
itemToLabel function is called and assign that value to width.
Unfortunately, the result is very messy. The column is not just 
rendering correctly and you cannot resize the column anymore.


Anyway, I would like to get some ideas on how you all would take this 
issue.

Thank you for reading!
   

Reply via email to