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!

Anyone done major editing with a Data Grid

Status
Not open for further replies.

jfrost10

Programmer
Jun 3, 2001
2,004
CA
Hey guys, lookin' for some help here:

I need be able to set the size/controls within a cell in a datagrid, but havn't had any luck. I need to put three text boxes: one length=3, one length= 8, and one length=20 multiline and height 5, and a drop down list box.

Anyone have any thoughts how I can overwrite the default controls that ASP.NET puts in while in edit mode?

Thanks,
jack

p.s. I'm using Visual Studio Release Version and the latest .NET framework.
 
I HAVE SLAYED THE BEAST!!!

Yes, Yes I have!

k, I'm not even going to attempt to write down what I did to get my data-grid to look (in Cartman voice) hella-kewl, but I'll post a guide (or whatever they call them) up later next week about what I did.

If anyone has specific questions about what I did with my datagrid though, please post them under this post (I have this on email notification).

Thanks,

Jack
 
Jack -

How did you get a multiline textbox in your datagrid?? I am having a helluva time trying to find answers to this. Any help would be greatly appreciated!
 
Create a template column, and in the html view, in the templates ItemTemplate tags, add an asp:TextBox control, and set it to be multiline, size, etc.

Then when your page renders, you'll always have the control visible.

If you want it to only be visible during editing, do the same thing but put it between the EditTemplate tags instead.

If you want to access that control via code, you just assign an instance of that control to the control in the row
i.e.
Dim txt as TextBox
txt = CType(e.items(index).cells(index).controls(1),TextBox)

hth

D'Arcy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top