Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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:

Hamlet
Posted

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

Posted

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:-\

Hamlet
Posted

This is just a suggestion (I haven't tried it). Try adding the following after the multiline statement.

 

dg.PreferredRowHeight = theCol.TextBox.Height

Posted

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.

Hamlet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...