This is a migrated thread and some comments may be shown as answers.

radTreeView inside a PopUp

4 Answers 125 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Xorv
Top achievements
Rank 2
Xorv asked on 04 Jan 2012, 06:59 AM
Hi Admin,

I have asp.net page. In that one label\link is there. Once the link is clicked, a popup would appear. I want a radTreeView inside it, containing details from database.
My question is:- 'How to generate a RadTreeView inside a PopUp, when a link is clicked'

Please see the attached image, for the requirement.

Regards,
Sourav

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Jan 2012, 07:23 AM
Hello Sourav,

You can attach the ClientClick event to the LinkButton and open the window.
aspx:
<asp:LinkButton ID="lnk" Text="Click" runat="server" OnClientClick="OpenRadWin();return false;"></asp:LinkButton>
 <telerik:RadWindow   Modal="true"   ID="RadWindow1" runat="server"  >
  <ContentTemplate>
    <telerik:RadTreeView ID="RadTreeView3" DataSourceID="SqlDataSource1" DataTextField="LastName" DataValueField="FirstName" DataFieldID ="EmployeeID" runat="server"></telerik:RadTreeView>
  </ContentTemplate>
 </telerik:RadWindow>
JS:
<script type="text/javascript">
   function OpenRadWin()
  {
   var oWnd = $find("<%= RadWindow1.ClientID %>");
   oWnd.radopen(null, "RadWindow1");
  }
</script>

-Shinu.
0
Xorv
Top achievements
Rank 2
answered on 04 Jan 2012, 07:55 AM
Hi Shinu,
Its not working.
After the click event, page re-loads and nothin happens.
Some error must be there.


Please see what could be the prob.
thnx
0
Xorv
Top achievements
Rank 2
answered on 04 Jan 2012, 10:13 AM
SOMEBODY PLEASE HELP !!!
0
Accepted
Kevin
Top achievements
Rank 2
answered on 04 Jan 2012, 02:27 PM
Hello Xorv,

The problem is with the js code. There is no radopen method on the RadWindow object. It should look like this to open a window.

<script type="text/javascript">
   function OpenRadWin() 
  {
   var oWnd = $find("<%= RadWindow1.ClientID %>");
   oWnd.show();
  }
</script>

I hope that helps.

Tags
TreeView
Asked by
Xorv
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Xorv
Top achievements
Rank 2
Kevin
Top achievements
Rank 2
Share this question
or