stordaz Posted May 8, 2003 Posted May 8, 2003 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. Thanks stefano Quote
Jarod Posted May 8, 2003 Posted May 8, 2003 Well, I see two solutions : - 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 Quote Jarod
stordaz Posted May 8, 2003 Author Posted May 8, 2003 I tried to set TextBox.Multiline = true but it doesn't change the height of my row... Anyway thanks for your hint, Jarod. I think I need to study a lot about this datagrid.. Quote
donnacha Posted June 27, 2003 Posted June 27, 2003 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. Quote Hamlet
stordaz Posted June 27, 2003 Author Posted June 27, 2003 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. Quote
syclp Posted October 5, 2004 Posted October 5, 2004 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. Thanks in advance. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.