[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

asp.net vb.net how can acces label control inside gridview column template

Posted on 2010-08-27
2
Medium Priority
?
459 Views
Last Modified: 2012-06-21
I need show/hide a label control inside gridview column template, how can access from aspx.vb code.
0
Comment
Question by:rflorencio
2 Comments
 
LVL 20

Assisted Solution

by:informaniac
informaniac earned 400 total points
ID: 33542503
I'm not sure of vb but in C# it's like this

Label lblName = Gv.Rows[0].FindControl("lblName") as Label;
lblName.Visible = false;
0
 
LVL 3

Accepted Solution

by:
raaziq earned 1600 total points
ID: 33543576
u can use the gridview RowDatabound event,

 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
              Label lbl = e.Row.FindControl("Label1");
        }


u can set its visibility frm here based on any conditions. it occurs during the binding of each rows of the gridview.

cheers.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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.…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 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