Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multilines textbox in DataGrid

Status
Not open for further replies.

elinM

Programmer
Feb 12, 2004
15
NO
Hi.

I'm trying to make a table look(whit datagrid) to view a date and a comments.Its often much text in the commens, and I want to show all the text bay using multilines in a textbox. Does anybode knows how I can do that?

regrads,

Elin M.
 
For the comments column which is a “text” type in the data source (for example in MSSQL) I displayed a “X” in the Comments column in the DataGrid object.
X means there are comments for that item and when the user click on that column then the text is displayed in multilines text box on a dialog form. There the user may log other comments to the existing comments or just have a way to read the whole comments in a given format.
-obislavu-
 
You can set the DataGrid PreferredRowHeight property to a larger value, but this will affect all rows, even if there are no comments.

If you want to vary the height of each row based on the contents of its columns, you need to derive a datagrid and override the row height calculations. See for a really good example.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top