Link to home
Start Free TrialLog in
Avatar of Rowdyone52
Rowdyone52

asked on

DataGridView Data

I would like to have a datagrid in which I can enter

this is text (newline)
this is more text

How do I enter a newline in a DataGridView Cell??

Also I would like to add label controls to a cell how can I do that?
Avatar of Jigit
Jigit
Flag of Israel image

Adding new line can be done by Ctrl-Enter or Shift-Enter.
Adding static label controls can be easily done by just putting <TD> in the datagrid; adding dynaminc (bound) label controls can be also easily done by binding the desired field to the DataGrid.
Avatar of Rowdyone52
Rowdyone52

ASKER

How do I shift enter when I do it by coding, rather than manually entering it?

Datagrid1.rows[0].cells[0].value = ?
Can you give me an example to binding the control?

I only see how to bind it to datagridview1.control.add(), but I need to do it on the cell level.
ASKER CERTIFIED SOLUTION
Avatar of Jigit
Jigit
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial