Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mikeg - 23 Jun 2007 19:05 GMT
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
Scott M. - 23 Jun 2007 19:23 GMT
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.

> Hi,
>
[quoted text clipped - 13 lines]
>
> MikeG
mikeg - 23 Jun 2007 21:08 GMT
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

> 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
[quoted text clipped - 23 lines]
> >
> > MikeG
Scott M. - 23 Jun 2007 23:56 GMT
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.

> Hi Scott,
>
[quoted text clipped - 46 lines]
>> >
>> > MikeG
mikeg - 24 Jun 2007 01:30 GMT
Hi Scott,

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

MikeG

> Hi Mike,
>
[quoted text clipped - 56 lines]
> >> >
> >> > MikeG
Scott M. - 24 Jun 2007 04:46 GMT
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.

> Hi Scott,
>
[quoted text clipped - 76 lines]
>> >> >
>> >> > MikeG
Scott M. - 24 Jun 2007 04:48 GMT
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!

> Hi Scott,
>
[quoted text clipped - 76 lines]
>> >> >
>> >> > MikeG
mikeg - 25 Jun 2007 02:32 GMT
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

> One more thing that you may figure out but needs saying....
>
[quoted text clipped - 83 lines]
> >> >> >
> >> >> > MikeG
Scott M. - 25 Jun 2007 12:32 GMT
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.

> Hi Scott,
>
[quoted text clipped - 112 lines]
>> >> >> >
>> >> >> > MikeG
mikeg - 26 Jun 2007 00:57 GMT
I will try that Scott.

Thanks for all the help!!

> 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
[quoted text clipped - 118 lines]
> >> >> >> >
> >> >> >> > MikeG

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.