472,993 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

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

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
Jun 23 '07 #1
8 1933
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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...
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

Jun 23 '07 #2
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

"Scott M." wrote:
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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...
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


Jun 23 '07 #3
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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:51**********************************@microsof t.com...
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

"Scott M." wrote:
>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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:8B**********************************@microso ft.com...
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



Jun 23 '07 #4
Hi Scott,

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

MikeG

"Scott M." wrote:
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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:51**********************************@microsof t.com...
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

"Scott M." wrote:
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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...
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


Jun 24 '07 #5
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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:2A**********************************@microsof t.com...
Hi Scott,

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

MikeG

"Scott M." wrote:
>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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:51**********************************@microso ft.com...
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

"Scott M." wrote:

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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:8B**********************************@microso ft.com...
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



Jun 24 '07 #6
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!

"mikeg" <mi***@discussions.microsoft.comwrote in message
news:2A**********************************@microsof t.com...
Hi Scott,

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

MikeG

"Scott M." wrote:
>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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:51**********************************@microso ft.com...
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

"Scott M." wrote:

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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:8B**********************************@microso ft.com...
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



Jun 24 '07 #7
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

"Scott M." wrote:
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!

"mikeg" <mi***@discussions.microsoft.comwrote in message
news:2A**********************************@microsof t.com...
Hi Scott,

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

MikeG

"Scott M." wrote:
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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:51**********************************@microsof t.com...
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

"Scott M." wrote:

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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...
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



Jun 25 '07 #8
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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:7C**********************************@microsof t.com...
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

"Scott M." wrote:
>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!

"mikeg" <mi***@discussions.microsoft.comwrote in message
news:2A**********************************@microso ft.com...
Hi Scott,

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

MikeG

"Scott M." wrote:

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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:51**********************************@microso ft.com...
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

"Scott M." wrote:

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.
"mikeg" <mi***@discussions.microsoft.comwrote in message
news:8B**********************************@microso ft.com...
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




Jun 25 '07 #9

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

Similar topics

2
by: Mark Perona | last post by:
I created an ASP.net form with an editable datagrid on it. I can create new records, and update and delete existing records. The problem I have is that I want a field in the grid to be editible...
1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
3
by: Dan Williams | last post by:
Anyone know if i can take advantage of the datagrid features and use it in a vertical format to view and edit one record from a database? For example, Name: Address: Town: County:
3
by: D. Shane Fowlkes | last post by:
I have a Datagrid which in theory, should allow you to edit and update the records. I've stripped my test page down so that it's only attempting to update one field - "description". Yet when I...
1
by: Kamal Ahmed | last post by:
Hi All, I have a datagrid that contains multiple records. I want to edit any record in grid and then Update or Cancel same record. What is short & easy way to do so. TIA.
1
by: Randall Parker | last post by:
Currently in an asp:DataGrid I have a column for bringing up an edit form on a particular row and that is done by a hyperlink as follows: <asp:TemplateColumn HeaderText="Edit Record">...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
2
by: Iain | last post by:
Hi All I am witing a web app using Delphi developer 2006 (C# app) and I have a datagrid. Excuse the numptyness of the question. I have a datagrid with the ability to Insert, Edit/Update and...
1
by: Dica | last post by:
i need to allow the user to select a row from my dataGrid for editing. as such, i include the record ID in the first column and then extract like so when retrieving the record details: protected...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.