Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 March 30th, 2007, 10:36 PM
Authorized User
 
Join Date: Jun 2006
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
Default Datagrid problem urgent pl.

hello,
i got a datagrid.
in that datagrid along with my other bound columns i got a template column in which i have a dropdownlist.

now on post back of this dropdownlist i fire a event.
ddl_SelectedIndexChange

now under this m getting particular drop down selected value.

but problem is that against this dropdown i want the other bound values of same row .

how can i found that particular index of row.
pl pl help me got a demo urgent.

__________________
Komila Kalia
Software Developer
Reliance engineering Associates (P) Ltd.
 
Old March 31st, 2007, 04:15 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you work your way up the control tree from the dropdownlist that sends the event, you should eventually be able to get back up to the datagrid row that contains that ddl. Then you can access the row's other controls. So you would do something like this inside of the ddl_SelectedIndexChange handler:

gridrow = (DataGridRow)sender.Parent.Parent.Parent; //(you'll need to figure out how many parents to go to)

anotherControl = (AnotherControlType)gridrow.FindControl("another control ID");

My syntax isn't perfect, just writing from memory. That should get you started though.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get datagrid selected index pl help me msrnivas General .NET 1 July 1st, 2005 08:03 AM
datagrid problem urgent pls. dsmportal Pro VB.NET 2002/2003 0 February 7th, 2005 09:00 PM
Urgent: Other control in Datagrid mrleokarthik Pro VB 6 0 November 27th, 2003 01:30 AM





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