Textarea objects instead of text boxes in datagrids

J

J. Muenchbourg

How do I specify inside a datagrid that does edits/updates, that a
certain field should display its contents in TEXTAREA html objects, not
text box controls. See tag in boundcolumn/datagrid control:

<asp:BoundColumn
DataField="sampleletext"
HeaderText="Sample Text">
</asp:BoundColumn>

...and if I can put a textarea object in a datagrid, will I use the
.text method to parse the data from that field name when calling my sql
parameters and such:

MyCommand.Parameters.Add(New SQLParameter("@sampletext",
sampletext.text))

...when I tried using this reference to display "sampletext" inside a
textarea:

Dim sampletext As textarea = E.Item.cells(5).Controls(0)

...i got a "Type 'textarea' is not defined" error.

thanks for help
Muench


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
T

Teemu Keiski

Hi,

it is still of type TextBox. Locate it from Controls collection and change
its TextMode property to MultiLine. You'd need to do this in ItemDataBound
event for each and every row.

Might be cleaner solution just to implement this/these columns as
TemplateColumns and insert the TextBox declaratively.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top