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

TreeList AND Value in address bar

5 Answers 64 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
behnaz
Top achievements
Rank 1
behnaz asked on 09 Dec 2011, 03:53 PM
hi,
im using a rad tree list in my projects. its programmed in an user control, but i didn't load it directly, i load it from address bar, some things like this:
~/ManageDefault.aspx?type=MMPC&GrID=0
when i use this way loading, the tree list dosen't work properly, when i load it directly from .aspx page, it works right, how i can fix it?
all of my controls are in user controls, and i call them from code behind like previous link.

thanks for your helpful replies...

5 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 14 Dec 2011, 08:38 AM
Hello Behnaz,

From only the description we cannot know what is wrong with the RadTreeList control. First, how exactly do you use the query string, where, what code do you have? Then, what exactly does not work inside the treelist? The more details you provide, the higher is the chance that we manage to replicate and help you fix the issue.

Best wishes,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
behnaz
Top achievements
Rank 1
answered on 14 Dec 2011, 08:45 AM
i have a tree list that is bonded hierarchically with datatable. when i want to open the childs tag, it doesn't work, and return to the father, but when i use it in aspx page, it works right! i realized that it matters from url, but i want to use user controls in my project, and have just one aspx default page...

my code is ok, because it works in aspx page! and when drop the user control directly on page, it works! just when i call it from url, it does't work..
0
Tsvetina
Telerik team
answered on 14 Dec 2011, 04:56 PM
Hi Behnaz,

Please, provide the code you use to load the user controls and bind the RadTreeList. By default, there is no problem with having the control inside a dynamically loaded user control, as long as you load the user control correctly and bind the control as advised in our support resources.

Additionally, can you confirm whether you use AJAX and if so, does the same scenario work with AJAX disabled?

All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
behnaz
Top achievements
Rank 1
answered on 14 Dec 2011, 06:45 PM
It's where i load controls dynamically in code behind (Page_Load):
Panel1.Visible = false;
            if (Request["type"] != null)
            {
                tbl_Links.Visible = false;
                Panel1.Controls.Clear();
                Panel1.Visible = true;
                switch (Request["type"])
                {
                    case "MHPC":
                        Panel1.Controls.Add(LoadControl("UserControls/M_MainPage.ascx"));
                        break;
                    case "MNC":
                        Panel1.Controls.Add(LoadControl("UserControls/M_News.ascx"));
                        break;
}
            }

it is binding function:
     private void BindData()
        {
            _menuCatBll = new MenuCategoryBLL();

            // Bind TreeList
            DataTable dt = _menuCatBll.GetAll();
            if (dt != null && dt.Rows.Count != 0)
            {
                TL_Menu.DataSource = dt;
            }
        }

about ajax:
yes i tried it, its all right, just from loading the dynamically this problem appear!
0
Tsvetina
Telerik team
answered on 19 Dec 2011, 01:09 PM
Hello Behnaz,

One thing to confirm is that you reload the latest loaded user control on each postback, otherwise it is expected to misfunction:
Load User Controls

From what I see, you load a user control only when it is "requested" which is not supported, especially in an AJAX scenario.

Greetings,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TreeList
Asked by
behnaz
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
behnaz
Top achievements
Rank 1
Share this question
or