Solved

How to use the DataGrid Findcontrol in asp.net

Posted on 2006-07-06
6
712 Views
Last Modified: 2010-05-19
How to use the DataGrid Findcontrol in asp.net with examples
0
Comment
Question by:Nissi_infotech
6 Comments
 
LVL 19

Accepted Solution

by:
DreamMaster earned 500 total points
ID: 17049133
This link explains it all..

http://www.odetocode.com/Articles/116.aspx

Regards,
Max.
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
ID: 17049238
Hi

just check the following Link
http://www.dotnetjohn.com/articles.aspx?articleid=83

Cheers!!!
0
 
LVL 7

Expert Comment

by:ayha1999
ID: 17175871
<asp:datagrid id="Datagrid1" runat="server" Font-Size="Small"  AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn HeaderText="Status">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemTemplate<asp:Label ID="lblStatus" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Status") %>'>      </asp:Label></ItemTemplate>
</asp:TemplateColumn>

...
</Datagrid>

Here you can retrive lblStatus value as follows:

dim dim YourVariableName as string = CType(e.Item.FindControl("lblStatus"),Label).Text

Just replace Label with textbox or hyperlink with appropriate controls name.

hope this helps.

ayha
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

813 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

11 Experts available now in Live!

Get 1:1 Help Now