Solved

How to use the DataGrid Findcontrol in asp.net

Posted on 2006-07-06
6
714 Views
Last Modified: 2010-05-19
How to use the DataGrid Findcontrol in asp.net with examples
0
Comment
Question by:Nissi_infotech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

759 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