Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > What's the best way to handle showing/editing this data?

Reply
Thread Tools

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

 
 
Alan Silver
Guest
Posts: n/a
 
      02-16-2005
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)
 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      02-16-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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)



 
Reply With Quote
 
 
 
 
Alan Silver
Guest
Posts: n/a
 
      02-16-2005
>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)
 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      02-16-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> >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)



 
Reply With Quote
 
Alan Silver
Guest
Posts: n/a
 
      02-16-2005
>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)
 
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
best way to handle sql decimal fields Steve Richter ASP .Net 3 03-31-2005 02:55 PM
What is the best way to handle a command line argument that includes an escape sequence like \n? Joe Python 8 03-04-2005 02:45 AM
Best way to handle documents in ASP.NET Thomas Scheiderich ASP .Net 11 05-20-2004 05:57 PM
Question: Best way to handle DBNULL in datareaders Ravikanth[MVP] ASP .Net 6 07-18-2003 10:51 AM
Re: Best way to handle a mutually exclusive situation gabriel XML 0 06-25-2003 08:08 AM



Advertisments