Solved

Finding a control inside listview

Posted on 2012-12-30
1
397 Views
Last Modified: 2012-12-31
I have a listview like this:

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

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

0
Comment
Question by:Camillia
1 Comment
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 38731944
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

829 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