Finding a control inside listview

Posted on 2012-12-30
Medium Priority
Last Modified: 2012-12-31
I have a listview like this:

<asp:ListView ID="lvSubscription" 
         <td style="text-align:center" width="295" >
             [b] <telerik:RadTreeView ID="RadTreeView1"  runat="server">

Open in new window

How can I find that listview when in page_load? This gives me null. Is this because when the page loads, the listview is not created yet??

  if (!Page.IsPostBack)
     RadTreeView tv = (RadTreeView)lvSubscription.FindControl("RadTreeView1");

Open in new window

Question by:Camillia
1 Comment
LVL 39

Accepted Solution

Pratima Pharande earned 2000 total points
ID: 38731944

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…

621 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