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

Combo Box with a treeview and RadAjaxmanegerProxy

2 Answers 40 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
A K
Top achievements
Rank 1
A K asked on 26 Apr 2010, 07:36 PM

I have a  combobox with  a treeview ( tvCategory) inside it. ON the same web page I have a asp panel and on which I have a user Control.

I am trying to use AJAXManagerProxy control. ON treeview node change I want to update panel on the web page. Following code I have used for this.

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">

    <AjaxSettings>

       <telerik:AjaxSetting AjaxControlID="tvCategory">

                <UpdatedControls>

                    <telerik:AjaxUpdatedControl ControlID="tvCategory" />

                    <telerik:AjaxUpdatedControl ControlID="pnlDetail" LoadingPanelID="RadAjaxLoadingPanel1" />

                    <telerik:AjaxUpdatedControl ControlID="txtNAme" LoadingPanelID="RadAjaxLoadingPanel1" />

                </UpdatedControls>

        </telerik:AjaxSetting>

</telerik:RadAjaxManagerProxy>

On NodeClick event I am trying to set properties of user control.

      Protected Sub tvCategory_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs)

 

            If e.Node.Value.ToString <> vbNullString Then

                  Category1.CategoryID = New Guid(e.Node.Value.ToString) 'setting up User control's  categoryId property

                  Category1.LoadCategory = True

            End If

 

            pnlDetail.Visible = True

      End Sub

Page Load of the user control is called before NodeClick event  and I am not able to get the data because I need to know the node selected value to set up on the user control.

How do I do this?

Thanks is advance!!!

2 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 26 Apr 2010, 08:36 PM
I would suggest creating a method on your user control like "LoadData()", so that the values you passed in the node click event can be used to generate whatever you have in the user control. I don't see any other way of accomplishing what you want to do, since all events are handled after the page load event.

Another suggestion could be to add the user control to the panel during the tree view's node click event.

I hope that helps.
0
A K
Top achievements
Rank 1
answered on 26 Apr 2010, 08:56 PM
When do I call LoadData()? it should be called from a parent page after nodeclick?
Tags
ComboBox
Asked by
A K
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
A K
Top achievements
Rank 1
Share this question
or