Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > How do I add a Textbox to my DataGrid?

Reply
Thread Tools

How do I add a Textbox to my DataGrid?

 
 
B Holt
Guest
Posts: n/a
 
      10-30-2003
Here's the problem: I am using WebMatrix and although I have a lot of IDE
experience, I am a newbie at Web-based apps.

How Do I get a TextBox into (each row of) my DataGrid to allow the user to
edit the value of one column?

I have seen a lot of "sample code", but all of it contains syntax that I
simply do not understand.

Can anyone PLEASE just explain in simple terms the steps I need to take? I
have all the column. I just want one of them to be editable. I AM using a
DataGrid control, and not an MxDataGrid (which I believe is correct.)

Please help!!!!


 
Reply With Quote
 
 
 
 
Josh Behl
Guest
Posts: n/a
 
      10-30-2003
There are a couple of ways to approach this.

First, you can right click your datagrid, choose property builder, in the
window that opens, click on the 'columns' link on the left hand side. This
will open another window which will allow you to allow the addition of all
columns, specific columns, edit/select/cancel buttons, etc..... At the top
of this window there are two listboxes. On the left hand listbox, scroll
down or collapse the first node. expand the next node which is called
'buttons' I think (I'm trying to remember this off the top of my head).
Once expanded, select the edit, select option and pass that to the right
hand lsit box. Click OK.

There is some other code which you need to save your changes, get the cancel
button to work, etc. You can find that information at the following link:
http://msdn.microsoft.com/library/de...dwritedata.asp
This example is probably one of the easiest ones to follow for a 'newbie'.
Another site which I have refernced before as a good one stop shop to find
articles about datagrids is www.datagridgirl.com. Another is
www.4guysfromrolla.com. If you are new to web appls it may be a bit tricky
to latch on to at first.

Good Luck

"B Holt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Here's the problem: I am using WebMatrix and although I have a lot of IDE
> experience, I am a newbie at Web-based apps.
>
> How Do I get a TextBox into (each row of) my DataGrid to allow the user to
> edit the value of one column?
>
> I have seen a lot of "sample code", but all of it contains syntax that I
> simply do not understand.
>
> Can anyone PLEASE just explain in simple terms the steps I need to take?

I
> have all the column. I just want one of them to be editable. I AM using

a
> DataGrid control, and not an MxDataGrid (which I believe is correct.)
>
> Please help!!!!
>
>



 
Reply With Quote
 
 
 
 
B Holt
Guest
Posts: n/a
 
      10-31-2003
Now I have my TextBoxes in the DataGrid. How do I read them and update the
information in the database? My Update Query is returning the correct
number of "RowsAffected", but the data is not changing. Do I need to UnBind
the DataGrid before Updating? Any ideas?


Thanks for the help!



"Josh Behl" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> There are a couple of ways to approach this.
>
> First, you can right click your datagrid, choose property builder, in the
> window that opens, click on the 'columns' link on the left hand side.

This
> will open another window which will allow you to allow the addition of all
> columns, specific columns, edit/select/cancel buttons, etc..... At the

top
> of this window there are two listboxes. On the left hand listbox, scroll
> down or collapse the first node. expand the next node which is called
> 'buttons' I think (I'm trying to remember this off the top of my head).
> Once expanded, select the edit, select option and pass that to the right
> hand lsit box. Click OK.
>
> There is some other code which you need to save your changes, get the

cancel
> button to work, etc. You can find that information at the following link:
>

http://msdn.microsoft.com/library/de...dwritedata.asp
> This example is probably one of the easiest ones to follow for a 'newbie'.
> Another site which I have refernced before as a good one stop shop to find
> articles about datagrids is www.datagridgirl.com. Another is
> www.4guysfromrolla.com. If you are new to web appls it may be a bit

tricky
> to latch on to at first.
>
> Good Luck
>
> "B Holt" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Here's the problem: I am using WebMatrix and although I have a lot of

IDE
> > experience, I am a newbie at Web-based apps.
> >
> > How Do I get a TextBox into (each row of) my DataGrid to allow the user

to
> > edit the value of one column?
> >
> > I have seen a lot of "sample code", but all of it contains syntax that I
> > simply do not understand.
> >
> > Can anyone PLEASE just explain in simple terms the steps I need to take?

> I
> > have all the column. I just want one of them to be editable. I AM

using
> a
> > DataGrid control, and not an MxDataGrid (which I believe is correct.)
> >
> > Please help!!!!
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Calendar popup - using ASP textbox instead of HTML textbox =?Utf-8?B?Q2hyaXM=?= ASP .Net 3 03-30-2005 06:02 PM
runat="server"....a simple html textbox or a webform server textbox...that is the question. Hazzard ASP .Net 2 07-23-2003 07:32 AM
Re: runat="server"....a simple html textbox or a webform server textbox...that is the question. Natty Gur ASP .Net 0 07-22-2003 03:57 AM
Re: VERY STRANGE BUG? Adding a textbox control causes other textbox control to fail??? S. Justin Gengo ASP .Net 0 07-16-2003 06:51 PM



Advertisments