What's the best way to offer a fully editable grid?

A

Alan Silver

Hello,

I want to include a facility on a page whereby a grid of values is shown
so the user can edit it. I want it so that all values are available for
editing at all times, I don't want them to have to click on an "edit"
link to do a postback and be able to edit one line, then click OK to
submit it and have to click another "edit" for the next, etc.

I was thinking about using a repeater for this, and using textbox
controls in the <ItemTemplate>. hat way, all the contents of the grid
can be edited without a postback. I guess when the page is posted, I
would have to loop through each item in the repeater, find the controls
and deal with the contents. Is this a sensible way to do it? If not,
what is?

Also, what's the best way to allow them to add a new row to the list? I
was wondering about a separate set of textboxes below the repeater,
where they could enter the info for the new row and then click a button
to have it added. Again, is this a sensible way to do it?

Thanks for any help.
 
I

Ily

Use a templatecolumn and within the template column place a textbox or
dropdown list or whatever you need.

This way all your columns will always be editable
 
A

Alan Silver

Use a templatecolumn and within the template column place a textbox or
dropdown list or whatever you need.

This way all your columns will always be editable

What advantage does this have over the way I suggested? Making the
columns editable isn't a problem, as even a repeater can have textboxes
in the ItemTemplate. My question was more concerning getting at the data
afterwards.

Thanks for the reply.
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top