Solved

How to use the DataGrid Findcontrol in asp.net

Posted on 2006-07-06
6
710 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
Comment Utility
This link explains it all..

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

Regards,
Max.
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
Comment Utility
Hi

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

Cheers!!!
0
 
LVL 7

Expert Comment

by:ayha1999
Comment Utility
<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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

10 Experts available now in Live!

Get 1:1 Help Now