Solved

How to use the DataGrid Findcontrol in asp.net

Posted on 2006-07-06
6
713 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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 …

735 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