473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 1962
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.