Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services 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 August 16th, 2004, 12:13 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default multiple templates in datagrid

Hi

I am working in ASP.NET.

We are Using the datagrid to display data.But here we have many fields to display like emp code ,name ,location, ph ect
I want functionality like click on phone fields on a perticular row want to display detailed phone details means fax,IDD ect. Any idea how to do this

thanks



 
Old August 16th, 2004, 06:01 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

- Add the detail controls to your data grid template, but set them as visible=false
- Make the phone field show up as a link button with the command name "Select" (this will act as a grid item selector)
- In the grid's SelectedIndexChanged event, set the selected item's detail controls to visible=true

(Hint: You might need to save off the "last selected item" so that you can reset the controls to visible=false when you change to another selected item. The controls will maintain their visibility setting in viewstate until the grid is re-bound. Save the "last selected item" in the viewstate collection and retrieve at the beginning of your SelectedIndexChanged handler. Reset the visibility of the last selected item's detail controls before setting the new ones.)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Templates Shiamak Word VBA 3 January 8th, 2007 07:49 PM
Multiple parameters for a datagrid jgsuter ASP.NET 2.0 Professional 1 June 14th, 2006 09:31 AM
Can I 'apply-templates' across multiple XML docume mphare XSLT 1 June 8th, 2006 05:12 PM
Editing Multiple Rows At Once(Datagrid) Jamal Junior ASP.NET 1.0 and 1.1 Basics 0 May 2nd, 2006 07:52 PM





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