Breaking out a record with in a datagrid to edit it (ASP 1)

G

Guest

Hi,

I am building a small Help Desk application for my company and need to be
able to edit "open" help desk issues. I use a simple datagrid to display
each issue (6 per page) , with an Edit button. There are a lot of fields
across, and my Network Admins would like a way of editing/updating each
issue seperately in a a vertical form. I need a way of clicking on the edit
button ,bringing up a form with the record, editng the fields, and clicking
on an Update button in the form to update the sql server table , and go back
to the datagrid , displaying the updated record/Issue.

Thanks for the help,

MikeG
 
S

Scott M.

Why don't you just edit the record in the datagrid? The edit "mode" can use
different controls than the normal viewing of the grid, so you'll have a
feature-rich UI to do your edits in.

If you really don't want to do that and you want a form to come up, you'll
have to put a regular button on the grid (not an edit button) and handle its
click event with code to unhide a panel that you've pre-set up with the
controls you want. You'll need to pass the id of the record being edited
from the grid, so you know which record to populate the panel with.
 
G

Guest

Hi Scott,

Thanks for the help. There are too many fields horizontally to edit each
record. I demonstrated this. But my Admins want to click on the "Edit" link
and display the issue fields verticallyin a separate form for editing . As
this is my first ASP project it sounds a bit involved as you mentioned. How
do you use different controls when editing ? Perhaps I can redisplay the
fields so they are not cumbersome to edit across the screen.

Thanks

MikeG
 
S

Scott M.

Hi Mike,

Well it will certainly be more difficult if you want to edit outside of the
grid. But, I really feel that I should throw one more "try" in there for
you to consider using the grid itself for editing. With a little creative
thinking, you can make a record in "edit" mode display horizontally or
vertically or both. The key is to turn the columns of the grid into
"template" columns. Edit mode can look completely different from read mode
if you design it that way.
 
G

Guest

Hi Scott,

Let me investigate working with templates a bit. I think I see whay you
mean . Thanks for the help.

MikeG
 
S

Scott M.

When you turn a grid's column into a template column, you can then go in and
edit that template column for edit mode. This allows you to change the
types of controls that will be used to edit your data as well as allowing
you to "double" up and put more than just one control in a given column.
The columns will change horizontally and/or vertically depending on what you
put in them.

If you do your task this way, you will avoid the very big hassle of passing
the row being edited outside of the grid and have to make all new controls
that are bound to the data source.

Good luck,

Scott M.
 
S

Scott M.

One more thing that you may figure out but needs saying....

When you are desiging the "edit" portion of a template column, you can even
choose to move a control completely out of one template column and into
another so you can have one column that contains multiple items for editing.
This is a great space saver!
 
G

Guest

Hi Scott,

Thanks again for all the tips. I will try these tommorrow at work. What
about hiding columns while editing(click on edit mode button) , and just
using a few columns for all my fields? . Then it would appear as if the Help
Desk ticket fields where all vertical for easy editing .

Thanks,

Mike
 
S

Scott M.

What you can do, instead of hiding columns, is just have some of the edit
columns not have anything in them and move their controls into other
template columns so you might have a textbox above another textbox above a
checkbox and so on. If the column is empty, it won't take up any space in
edit mode.
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top