get panels created in the primary panel in code behind

  1. #1

    get panels created in the primary panel in code behind

    I have a panel and for doing some jobs user can to add another panel to this panel. I do this task by following code

    panels that add are closable and user can remove them at the end i need to get title id and html of inner panels that remain .but no method i find for this .
    I have to access it in code behind but i cant get items of primary panel by this code
        var Allitem = X.GetCmp<Panel>("PanelJou").Items;
    I would be grateful if anyone could suggest a way to do this
  2. #2
    Hello @TAYMA,

    What you are talking about seems to be a limitation related to ASP.NET pages life cycle. Code behind cannot always know the exact state of client-side, unless all the relevant state is actually transmitted back during the server call. We cannot always pass everything as it would just overload every request with things that are seldom necessary.

    So in a generic approach, what you can't get from code behind, like the items you dynamically added to a panel needs to be passed along the client-to-server call. For a lot of situations it should work without effort but for some specific scenarios, like the one you're describing, you would need to pass the state (panels, and their contents, however you can to minimize data throughput -- that's going to be a client upload) in order to work with them from code behind.

    This is as far as we can go with a response given the provided bits. If you need specific directions I'm afraid we'd need a test case reproducing your scenario so we can tell you exactly what you need to do to attain your objective.

    Sometimes it is profitable to rely a little more from client-side code and pass mostly "processed data" back to the server, to minimize client-server communication data amount.

    If in doubt how to make a test case we can use, please review our threads on general forum guidelines, there are nice examples in there I'm sure you can base your test case from.

    - Tips for creating simplified code samples
    - More Information Required
    - Forum Guidelines

    Examples explorer is also a great source of test case outlines.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Window hiding under Dynamically created Panels.
    By mohan.bizbites in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 03, 2014, 8:23 AM
  2. Replies: 0
    Last Post: Mar 13, 2014, 4:34 AM
  3. Replies: 0
    Last Post: Aug 28, 2013, 2:53 PM
  4. Replies: 11
    Last Post: Jul 12, 2013, 6:19 AM
  5. [CLOSED] Behind Code Panels Width
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 17, 2012, 10:36 AM

Posting Permissions