473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

multiline column in datagrid that accepts return

Can this be done? I have a memo field that I want to be
edited in a datagrid on a win form. I want to be able to
show three lines at a time and use returns. Here is what
I've tried.

DataGridTextBoxColumn colFullInfo = new
DataGridTextBoxColumn();
colFullInfo.MappingName = "fullinfo";
colFullInfo.Width = 400;
colFullInfo.HeaderText = "Extended Product Info";
this.styles.GridColumnStyles.Add(colFullInfo);

this.dataGrid1.SetDataBinding(this.dataSet11, "stock");

this.styles.MappingName = "stock";

this.dataGrid1.TableStyles.Add(this.styles);

DataGridTextBoxColumn myTextBoxColumn;

myTextBoxColumn = (DataGridTextBoxColumn)
this.dataGrid1.TableStyles["stock"].GridColumnStyles
["fullinfo"];

DataGridTextBox myGridTextBox;

myGridTextBox = (DataGridTextBox) myTextBoxColumn.TextBox;

myGridTextBox.Multiline = true;

myGridTextBox.AcceptsReturn = true;

myGridTextBox.Height = 60;

myGridTextBox.ScrollBars = ScrollBars.Both;

The only thing that works is the scroll bar. Does anyone
have some ideas?

Thanks,

Mike
Nov 15 '05 #1
0 1122

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alex K. | last post by:
How do I define multiline column header in DataGrid control? I need two-line headers for some columns. Thank you
9
by: Oberon | last post by:
My HashTable (Global.Games) is a static collection of objects of type Game. A Game object has 8 fields (exposed as properties). The key to the HashTable is also one of these fields (GameID, of type...
1
by: jeff maultby | last post by:
Hi All I need to display multiple lines of text in same column in datagrid on display as well as on edit. Want each row's height to auto size on display according to the nbr of lines in the...
2
by: Stan Sainte-Rose | last post by:
Hi, How can I display a multiline content into a Datagrid column ? The datagrid that I use, displays 2 columns. The first display a code , and the second, a description. The description can...
6
by: Agnes | last post by:
I understand it is impossible, but still curious to know "Can I freeze several column in the datagrid, the user can only scroll the first 3 columns (not verical), for the rest of the coulumn, it is...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
1
by: ABC | last post by:
I tried KDNGrid's (www.knowdotnet.com) Multiline textbox column style for datagrid. It is very good but has some bug on wrong handle datagrid height that cannot display the scrollbar when a row...
1
by: Mrozu | last post by:
Help me! I need to make multiline column in Datagrid. It is ReadOnly. Help me;) Thx Mrozu
1
by: Aziz | last post by:
How do I select a DataGrid column (the fourth one) to be multiline so that when there is more text than can fit horizontally, the text will carry on in the next line and automatically change the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.