Is it possible, while filling a datagrid, changing the row heigth
according to the text (e.g. multiline text)?
Sorry b
ut searching the forum I've found no answer.
- You specify a PreferredRowHeight to your datagrid and so you will be able to have bigger rows (but even if it is not needed)
- You implement a custom GridColumnStyle, and in the constructor, you specify me.TextBox.Multiline = true
Of course you will also have to create your custom DataGridtableStyle to use a custom editor that will allow you to choose your new GridColumnStyle at designe time
And you will also have to create you custom datagrid to use a custom editor to choose your new table Style
However, it is quite quick to do.
I have not tested, so I don't know if that solution work.
If you need an exemple to create your own GridColumnStyle and editors, here is a good link : http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q1020q
The PreferredRowHeight will give you bigger boxes but will not give you wordwrap. I have been trying to solve this for a while but havent managed it. I know it works because I have a 3rd party component that does it but I need to be able to do it myself. If you have solved it please let me know.
Hi Hamlet,
I've not found any solution for this problem for now but sooner or later I will need it.
Try to ask me again in the next few months... I hope I can help you too.
Hi Hamlet,
I've not found any solution for this problem for now but sooner or later I will need it.
Try to ask me again in the next few months... I hope I can help you too.
Were any of you able to find out how to make a multiline column? I searched through Google, but did not find any useful info. If you know something about this, please let us know.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.