473,326 Members | 2,113 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,326 software developers and data experts.

What's the best way to handle showing/editing this data?

hello,

I have a database table that stores names of schools, and I want o write
a page that allows someone to change the list.

I was wondering about showing the schools in a table, with existing
school names being in textboxes, each with a "delete" checkbox.
Modifying a school name would involve typing the changes in the textbox
and clicking a Submit button. Deleting a school would involve checking
the school(s) to be deleted, and then clicking a Delete button. Adding a
new school would be done via a separate textbox below the table.

All of this sounds fine (to me), but I'm a bit lost as to how to go
about it. I could use a repeater control to generate the table, but I'm
not sure the best way to add the textboxes. The problem is that I don't
know how you would specify the ID, as you would have loads of textboxes
with the same ID. Same problem goes for the checkboxes.

Anyone any idea how I would do this? Some simple code would help if you
can as I'm fairly new at this and a bit of code speaks a thousand words
;-)

Thanks for any help you can give

--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #1
4 1209
The standard datagrid supports all the functionality you mentioned.
I suggest you use it.
Here are some code samples:
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
http://msdn.microsoft.com/library/de...vercontrol.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Alan Silver" <al*********@nospam.thanx> wrote in message
news:W7**************@nospamthankyou.spam...
hello,

I have a database table that stores names of schools, and I want o write a
page that allows someone to change the list.

I was wondering about showing the schools in a table, with existing school
names being in textboxes, each with a "delete" checkbox. Modifying a
school name would involve typing the changes in the textbox and clicking a
Submit button. Deleting a school would involve checking the school(s) to
be deleted, and then clicking a Delete button. Adding a new school would
be done via a separate textbox below the table.

All of this sounds fine (to me), but I'm a bit lost as to how to go about
it. I could use a repeater control to generate the table, but I'm not sure
the best way to add the textboxes. The problem is that I don't know how
you would specify the ID, as you would have loads of textboxes with the
same ID. Same problem goes for the checkboxes.

Anyone any idea how I would do this? Some simple code would help if you
can as I'm fairly new at this and a bit of code speaks a thousand words
;-)

Thanks for any help you can give

--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #2
>The standard datagrid supports all the functionality you mentioned.
I suggest you use it.
Here are some code samples:
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
http://msdn.microsoft.com/library/de.../en-us/dv_vste
chart/html/vbtchtopquestionsaboutaspnetdatagridservercontrol. asp


Steve,

Thanks for the links. I had looked at the data grid and it does do all
of this. Since posting, I have built a page that allows the full works
on the list. I am amazed at how easy this stuff is in ASP.NET.

However, the one thing I don't like about it is the number of clicks you
need to do anything.

For example, to edit something, you have to click an "edit" link, then
change the text, then click a "save" link. If you need to do a few this
can take time. I was hoping to be able to show the data in text boxes,
allow the user to change as many as they like right there on the list
and click one "Update" button.

This is all based on the samples I have seen with the data grid. If you
know a way of doing what I want with the data grid, please enlighten me.
What I have works, and is basically acceptable, but it isn't really
user-friendly as it requires the user to make clicks that are of no
benefit to him. I would like to improve on that.

Thanks for the reply.

--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #3
This shows how to allow editing multiple rows at once, which could save them
some time in this scenario:
http://msdn.microsoft.com/library/de...vercontrol.asp
(look near the end)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Alan Silver" <al*********@nospam.thanx> wrote in message
news:y3**************@nospamthankyou.spam...
The standard datagrid supports all the functionality you mentioned.
I suggest you use it.
Here are some code samples:
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
http://msdn.microsoft.com/library/de.../en-us/dv_vste
chart/html/vbtchtopquestionsaboutaspnetdatagridservercontrol. asp


Steve,

Thanks for the links. I had looked at the data grid and it does do all of
this. Since posting, I have built a page that allows the full works on the
list. I am amazed at how easy this stuff is in ASP.NET.

However, the one thing I don't like about it is the number of clicks you
need to do anything.

For example, to edit something, you have to click an "edit" link, then
change the text, then click a "save" link. If you need to do a few this
can take time. I was hoping to be able to show the data in text boxes,
allow the user to change as many as they like right there on the list and
click one "Update" button.

This is all based on the samples I have seen with the data grid. If you
know a way of doing what I want with the data grid, please enlighten me.
What I have works, and is basically acceptable, but it isn't really
user-friendly as it requires the user to make clicks that are of no
benefit to him. I would like to improve on that.

Thanks for the reply.

--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #4
>This shows how to allow editing multiple rows at once, which could save them
some time in this scenario:
http://msdn.microsoft.com/library/de.../en-us/dv_vste
chart/html/vbtchtopquestionsaboutaspnetdatagridservercontrol. asp
(look near the end)


Thanks, that's exactly what I want to do. Trouble is (as usual with MS),
the author assumed you have VS (I don't) and relied on that. He doesn't
supply enough code to show what the effects of some of the VS commands
is.

never mind, I'll still have a look and see how far I get. Thanks for the
link.

--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #5

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

Similar topics

2
by: Andrew Dorph | last post by:
I have a database with 3 tables - Equipment, History and Employee. The relationships are: One-to-Many From Equipment to History Many-to-One From History to Employee I want to set up a means...
6
by: allyn44 | last post by:
HI--what I am trying to do is 2 things: 1. Open a form in either data entry mode or edit mode depending on what task the user is performing 2. Cancel events tied to fields on the form if I am in...
24
by: Bob Alston | last post by:
Most of my Access database implementations have been fairly small in terms of data volume and number of concurrent users. So far I haven't had performance issues to worry about. <knock on wood> ...
3
by: Jason | last post by:
We have an Extranet with one customer with 20,000 users that has, unfortunately, standardized on Netscape 4.77 for the entire company. We are in the process of rewriting this application from Java...
0
by: Alan Silver | last post by:
Hello, I have an e-commerce package that currently offers an application that installs on the user's PC to allow them to manipulate the product database. I'm considering converting (ie rewriting...
4
by: T.Jackson | last post by:
Hi guys, I want to display the data of a table in a datagrid in one form, & enable the user to edit the details of a particular record in another form. I want the following features, 1....
63
by: Jake Barnes | last post by:
In the course of my research I stumbled upon this article by Alex Russel and Tim Scarfe: http://www.developer-x.com/content/innerhtml/default.html The case is made that innerHTML should never...
2
by: Paulo Roberto | last post by:
Hi, I have a VS2005 asp.net 2.0 C# application with a lot of screens just like customers, companys, manufacturers wich has always the same basics working like a gridview showing the records, and...
28
by: gnuist006 | last post by:
I have some code like this: (if (test) (exit) (do something)) or (if (test)
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.