Solved

Replicate RowHeaderMouseDoubleClick in web form

Posted on 2011-09-13
8
224 Views
Last Modified: 2012-05-12
On a windows form the datagrid has an event RowHeaderMouseDoubleClick
I'm trying to convert a windows form to run in ASP.net 2.0 as a web form.
How can I replicate RowHeaderMouseDoubleClick in a web form using a gridview?
0
Comment
Question by:AlHal2
  • 4
  • 4
8 Comments
 

Author Comment

by:AlHal2
ID: 36530315
In the windows form this event opened a sub form using "showdialog"

The sub form had another grid that was populated using the selected value on the grid of the first form eg.

i = PreviousForm.Grid2.CurrentRow.Index

¿I'm trying to replicate this functionality in a web form using asp.net 2.0 with vb 2005



0
 
LVL 7

Expert Comment

by:mr_nadger
ID: 36535452
I don't think you can do this, and I can't remember any websites which used a double click instead of a single.
Alternatives you could user are:
Modal popup using the ajax toolkit
On hover panel
Tooltip manipulation.

It really depends what you're wanting to do with this sub grid.
0
 

Author Comment

by:AlHal2
ID: 36536159
Single click is fine.  The main form is basically a read only screen.  It has drop down boxes and buttons for filtering the grid.
When the user clicks the grid on the main form it brings up a subform with a grid displaying more information for the selected item.  It also has text boxes and buttons for updating and inserting data on the grid.
By default the text boxes also reflect what was clicked on the main form.
0
 
LVL 7

Expert Comment

by:mr_nadger
ID: 36536344
personally, I'd build a web user control with a formview for displaying and editing the record (to mimic your subgrid popup), and place this new control inside a template field on the datagrid.  Then, when a record in the parent grid is selected, the formview is displayed in a modal pop up
(requires the ajax toolkit).

0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 7

Accepted Solution

by:
mr_nadger earned 300 total points
ID: 36536375
possibly overkill, but I did this for a web app at work and it works nicely.
I only needed a bit of code to set record numbers in the web control when the parent grid databound, and another bit to display the formview in a modal popup.
An alternative would be to display the formview in a collapsible panel
0
 

Author Comment

by:AlHal2
ID: 36536898
I don't have the AJAX toolkit, so was your second solution with or withou it?
0
 

Author Closing Comment

by:AlHal2
ID: 36548183
I think the AJAX toolkit is easily available, so here are the points.
0
 
LVL 7

Expert Comment

by:mr_nadger
ID: 36548194
http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/

Download, tutorials and advice :)
A lot of people on EE use it too.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now