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

GridView Directly Accessing the Edit of FormView

Is it possible to get a GridView 'Select' to go straight to the 'Edit'
of a Formview.

If I add a 'New' button to the GridView can I get that to go straight
to the Insert of a FormView.

Is it possible to trap the event of 'Update' Button Pressed in
FormView. When I select the linkButton in Formview

Thanks for any help / pointers.

Tim

May 22 '06 #1
1 2132
The answer appears to be changing the default Mode of the FormView to
Edit or Insert.

I still can not work out how to trap the Gridview / FormView
LinkButtons

I created the following code by copying the code generated by having a
link button on a page, but not within a formview.

'Protected Sub UpdateButton_Click(ByVal sender As Object, ByVal e
As System.EventArgs) Handles UpdateButton.Click
' Response.Write("Update Link Button Clicked" + "<BR>")
'End Sub
'Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e
As System.EventArgs) Handles InsertButton.Click
' Response.Write("Insert Link Button Clicked" + "<BR>")
'End Sub

But I get a compiler Error

Error 1 Handles clause requires a WithEvents variable defined in the
containing type or one of its base types.

This is getting to serious hair removal time.

May 22 '06 #2

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

Similar topics

3
by: Dabbler | last post by:
What is the best way to have a FormView page open on a specific row selected from a GridView? I'm passing the primary key in the url as in detailview.aspx?mode=edit&pk=42 I'm using an...
1
by: Kyle K. | last post by:
I would like to build my data pages such that the top of the page contains a GridView showing the data with 'Enable Select = true'. Below that I would like to have a FormView, that by default is...
0
by: MRW | last post by:
For some strange reason, I'm having problems finding a GridView in a FormView. I keep getting the error: Object reference not set to an instance of an object. I have the code below, it's very...
1
by: joechipubik | last post by:
I have a GridView in a FormView that has as its datasource a DataTable that is stored in the session cache. When I first load the page the GridView is displayed correctly, but on subsequent loads...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
2
by: needin4mation | last post by:
In a GridView, take for example a delete button. When I click the delete button in my GridView the GridView row is deleted and the GridView rebinds and refreshes the records to show accurately. ...
0
by: LiamLiamLiam | last post by:
G'day all. I having a problem with my formview. I'll ty to explain my situation as best as i can. I have a page with a search field at the top which is just a simple asp:textbox. Below that i...
5
by: =?Utf-8?B?QWRhciBXZXNsZXk=?= | last post by:
Hi All, I have a GridView inside the EditItemTemplate of a FormView. Both FormView and GridView are data bound using an ObjectDataSource. When the FormView's ObjectDataSource object has a...
1
by: Paulo | last post by:
Hi, I have a aspx with a a FormView on left wich opens insert template as default containing all the TextsBox, Combos, etc, and on right a GridView listing the stored itens (ID column key)... When...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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:
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.