Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 November 20th, 2004, 08:12 AM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Selecting Item in a dataGrid


Hi m facing problem in selecting Data in a DataGrid..Actually my requirement is when i click/select a button(template button) in datagrid it should show the text of a perticular column of that row..
plz its urgent :)

 
Old November 21st, 2004, 01:20 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

The way I have done this in the past is to loop through the data set based on an ID of the row, and got the column value.
 
Old November 22nd, 2004, 11:12 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm not sure exactly what you are asking for, but I think this is what you want:

In the handler for the datagrid SelectedIndexChanged event, you simply can ask the datagrid item that was selected for the text of a particular column:

e.Item.Cells(x).Text

This will give you the text in the cell of column x for the selected row.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting DropDownList Item yes_no ASP.NET 1.0 and 1.1 Professional 1 April 8th, 2008 08:00 AM
problem selecting listview item method Visual C++ 0 July 7th, 2006 04:06 PM
Selecting a particular item in Datagrid muskaanbajaj ASP.NET 1.0 and 1.1 Professional 13 December 1st, 2005 07:47 AM
Selecting a ListView item bmains Pro VB.NET 2002/2003 0 January 22nd, 2005 11:19 PM
Selecting an Item from a databound listbox nyclimber ASP.NET 1.0 and 1.1 Professional 4 May 25th, 2004 03:24 PM





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