Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7879333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:52:41+00:00 2026-06-03T03:52:41+00:00

I’m having some problems trying to dynamically create multiple RadDocks at the same time.

  • 0

I’m having some problems trying to dynamically create multiple RadDocks at the same time.

What I’d like to achieve is to have multiple Docks added to the DockZone on a button click, but the only thing I get is first Dock properly created and displayed when the rest of them aren’t displayed (they are displayed after I refresh the webpage) and they are created but floating outside of the zone.

I have similar scenario when creating one Dock at a time and it works like a charm.

Here is the code:

protected void rbAddTickets_Click(object sender, EventArgs e)
        {
            var ticketList = (from t in db.Ticket
                              where t.idManager == idManager && t.Zatvoren == false || t.idManager == null && t.Zatvoren == false
                              select t).ToList();

            var memoTicketList = from t in ticketList
                                 where t.Memo == null || t.Memo == true
                                 orderby t.Firma.Naziv, t.idNadredeniTicket, t.RedniBroj, t.Opis
                                 select t;

            foreach (var ticket in memoTicketList)
            {
                RadDock dock = new RadDock();
                dock.UniqueName = ticket.idTicket.ToString();
                dock.ID = string.Format("RadDock{0}", dock.UniqueName);
                dock.Title = ticket.idNadredeniTicket + "-" + ticket.RedniBroj + " (" + ticket.Firma.Naziv + ")";
                dock.Text = ticket.Opis;
                dock.DockMode = DockMode.Docked;
                //dock.Index = Convert.ToInt32(Session["MinIndex"]) - 1;


                dock.Commands.Add(new DockCloseCommand());
                dock.Commands.Add(new DockExpandCollapseCommand());
                dock.Command += new DockCommandEventHandler(DockCommands);

                //ticket.Memo = true;
                //db.SaveChanges(); OMOGUĆI KASNIJE

                UpdatePanel1.ContentTemplateContainer.Controls.Add(dock);

                ScriptManager.RegisterStartupScript(
                dock,
                this.GetType(),
                "AddDock",
                string.Format(@"function _addDock() {{
    Sys.Application.remove_load(_addDock);
    $find('{1}').dock($find('{0}'));
    $find('{0}').doPostBack('DockPositionChanged');
}};
Sys.Application.add_load(_addDock);", dock.ClientID, rdzIncidenti.ClientID),
                true);
                CreateSaveStateTrigger(dock);

            }
        }

So, to sum everything up. I would like to generate Docks properly; display them immediately, without having to refresh the page and create them inside DockZone.

Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:52:42+00:00Added an answer on June 3, 2026 at 3:52 am

    The encountered behavior appears to be caused by problems in saving/loading the layout of the RadDock controls on the page (the missing docks) and setting different ID or/and UniqueName, when recreating the RadDocks after a postback (the floating docks).

    The online demo Dock / My Portal is a good example of dynamically creating and persisting the state of RadDocks and the scenario it implements is similar to yours, so I would suggest using it as a reference for your further development. The help article Dynamically Creating RadDock Controls will also be useful, as it lists the main steps for dynamically creating RadDocks.

    Overall, the code that you have provided appears to be correct, although I would suggest adding the new RadDocks in the Controls collection of RadDockLayout and docking them in a particular RadDockZone via the Dock method, when inserted in the page on button click. This is implemented in the ButtonAddDock_Click event handler in the linked demo via the following lines of code:

        RadDockZone dz = (RadDockZone)FindControl(DropDownZone.SelectedItem.Text);
        //adding the dock to the docklayout and then docking it to the zone to avoid ViewState issues on subsequent postback
        RadDockLayout1.Controls.Add(dock);
        dock.Dock(dz);
    

    Since I am mostly guessing as to what the rest of your implementation is, I would recommend examining the provided resources and utilizing them in order to achieve the desired functionality.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I am trying to render a haml file in a javascript response like so:
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I would like to count the length of a string with PHP. The string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.