Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 9th, 2007, 11:02 AM
Friend of Wrox
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default reference.

I was wondering how i can do the following.

I have results in a datagrid with selectable as an option. i want to take a detail view and make it so that while i dont have anything selected it isnt visable and when i do make a selection it

A. appears and
b. shows the details of the item selected.

any guidance?

Old April 9th, 2007, 07:29 PM
Friend of Wrox
Join Date: Apr 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts

Are you sure you want to use a dataGrid and not a GridView?

Anyway, handle the RowSelected event. in the handler get the selected row with something like...

Dim row As GridViewRow = myGridView.SelectedRow (I'm not sure what the equivalent dataGrid construct is).

Then get the ID of the row from the GridView/DataGrid's DataKey's property (which you set in the declaration to the primary key of the underlying table).

Finally pass that on to your details view and tell it to become visible.



Similar Threads
Thread Thread Starter Forum Replies Last Post
By value, By reference watashi C++ Programming 1 October 10th, 2007 11:04 PM
get reference name demac43 Excel VBA 2 November 20th, 2006 02:35 PM
in need of reference! alialibidad SQL Language 1 June 4th, 2006 05:14 AM
in need of reference! alialibidad ASP.NET 2.0 Professional 0 June 3rd, 2006 04:11 PM
reference is not valid paul20091968 Excel VBA 0 May 19th, 2006 04:55 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.