donnacha Posted June 17, 2003 Posted June 17, 2003 Hi folks, I am trying to display data in a datagrid that is too wide for the datagrid column. The datagrid takes up the full screen so I can't make it wider. Does anybody know how to make the datagrid text box a multi-line text box. I have tried a few things with table styles but nothing has worked yet. Any Ideas.:confused: Quote Hamlet
archer_coal Posted June 18, 2003 Posted June 18, 2003 RE datagrid This is all ive found thus far on that subject add Imports System.Windows.Forms.DataGridTextBox 'create you custom colums and tablestyles and add Dim theCol As DataGridTextBoxColumn theCol.TextBox.Multiline = True Hope this helps Quote
donnacha Posted June 19, 2003 Author Posted June 19, 2003 Thanks but I have already tried that plus theCol.TextBox.WordWrap= True but It still doesn't work this is really a pain, ther must be some way to do it, I have searched everywhere for possible examples. Does anybody know of an alternative to a datagrid that would allow me to do this. Tahks again:-\ Quote Hamlet
spebola Posted June 19, 2003 Posted June 19, 2003 This is just a suggestion (I haven't tried it). Try adding the following after the multiline statement. dg.PreferredRowHeight = theCol.TextBox.Height Quote
archer_coal Posted June 20, 2003 Posted June 20, 2003 RE you could try a listbox binding to a listbox is tricky tho with the INSERT, UPDATE, DELETE routines Quote
donnacha Posted June 25, 2003 Author Posted June 25, 2003 I would prefer to use a datagrid as I would have to learn the listbox and I have also got buttons in my grids. I have long since tried the preferred height, but like the others to no avail. The only thing i get is taht when I click in the cell I get to see all the contents. Thsi si not sufficent as I need to be able to print it as well. I have an example aplication that uses a 3rd party component but I do not want to use 3rd party components if at all possible, but this does show me that it does work, all I need now is to figure out how they did it. Any further ideas. Quote Hamlet
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.