473,395 Members | 1,905 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,395 software developers and data experts.

change the behaviour of edit button in DataGrid

Hello,

In Visual Studio .NET 2003,

I want that when clicking on "edit" within the datagrid,
I want to execute another web form,
which I get the input of the data in the other web form.
i.e : manupulating customers :
in each row of datagrid I have only firstname & lastname,
but when I do click on the "edit" within the datagrid,
I see another form,
that has firstname, family name & phone, address, etc...

How can I do that ?

Need sample code, please.

Thanks :)
Nov 19 '05 #1
1 1054
So you don't really want the "Edit" behavior in the grid and instead what
you want is a HyperlinkColumn like this:

<asp:HyperLinkColumn Text="Edit" DataNavigateUrlField="PKColumn" DataNavigateUrlFormatString="EditPage.aspx?ID={0}"
/>

DataNavigateUrlField is the column from your row in the DB to fill into the
URL. DataNavigateUrlFormatString is the URL for the hyperlink with the {0}
as the substituation parameter from your DataNavigateUrlField. EditPage.aspx
would then need to be coded to look for the ID query string.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hello,

In Visual Studio .NET 2003,

I want that when clicking on "edit" within the datagrid,
I want to execute another web form,
which I get the input of the data in the other web form.
i.e : manupulating customers :
in each row of datagrid I have only firstname & lastname,
but when I do click on the "edit" within the datagrid,
I see another form,
that has firstname, family name & phone, address, etc...
How can I do that ?

Need sample code, please.

Thanks :)


Nov 19 '05 #2

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

Similar topics

0
by: Mr. B | last post by:
In my app, I get all the info/data that I want from an Access data base. In one place I've the information displayed on a ListView. I let a user click on any line and then an 'edit' button. ...
0
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format....
4
by: DC | last post by:
Newbie's question about .NET datagrid If I use: <asp:EditCommandColumn></asp:EditCommandColumn> When I edit a row, it will automatically show Update and Cancel Link. But when I use:...
0
by: Steve Kallal | last post by:
I have a DataGrid with an EditCommandColumn column set to a type of PushButton. I want to set set CssClass on these buttons and cannot without using code-behind code on the ItemDataBound event. The...
3
by: Leo | last post by:
I have a datagrid with the first column as a Edit,Update,Cancel button column. The other 5 columns are template columns. When I click the Edit button in IE6 the row correctly displays the...
0
by: Vishal | last post by:
Hey, I have a datagrid which has viewstate enabled. It allows me to edit and update the datagrid. Now above the dg I have one textbox, one validator and one button. NOW when I press the edit...
3
by: pmud | last post by:
Hi, I have an ASP.NET application using C# code. I am using a datagrid to display records from a database based on a user input, i.e a user enters a compnay name in text box & when he clicks a...
4
by: Rob Kroese | last post by:
I've got a form with a datagrid that displays a list of items, along with several textboxes, comboboxes, etc., that display the details for the selected item. The columns in the datagrid and the...
8
by: =?Utf-8?B?bWlrZWc=?= | last post by:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.