[CLOSED] How to use FindControl() on the Panel?

  1. #1

    [CLOSED] How to use FindControl() on the Panel?

    Hi,

    What's the correct way to get a server handle on the control contained on a TabPanel? The following code doesn't work:

                    Ext.Net.Panel activeTab = X.GetCmp<Ext.Net.Panel>("Tab1");
                    GridPanel gridPanel= activeTab.FindControl("GridPanel1") as GridPanel; // Returns null
    Thanks,

    Vadym
    Last edited by Daniil; May 30, 2012 at 2:07 PM. Reason: [CLOSED]
  2. #2
    Hi,

    X.GetCmp destination is the following:

    1. It creates a proxy class to generate JavaScript by calling its methods.
    2. You can get an access to values from Post collection. For example, if you will create a TextField on client with "TextField1" id, you can access its text this way:
    X.GetCmp<TextField>("TextField1").Text
    That proxy class is not a real control and it doesn't know anything about a client side "twin" apart from automatically posted values (like TextField text).

    So, the "activeTab" has no any child control and the FindControl can't find anything.

    Please note if you create a control/widget on client, a server does know nothing about it.
  3. #3
    Quote Originally Posted by Daniil View Post
    Please note if you create a control/widget on client, a server does know nothing about it.
    Does it mean that I can't use the FindControl method on any control created on the client? Is there any alternative to that?

    Thanks,

    Vadym
  4. #4
    Yes, correct. A server does know nothing about widgets created on client.

    Well, I can't see any alternative. A single way is getting a required data from client via, for example, DirectEvent ExtraParams.
  5. #5
    Thanks for the clarification Daniil! You can mark this question as resolved.

    Vadym

Similar Threads

  1. Problem with FindControl
    By gpcontreras in forum 1.x Help
    Replies: 2
    Last Post: Feb 22, 2010, 9:03 PM
  2. [CLOSED] [1.0] DirectMethod Render FindControl
    By Patrick in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 08, 2010, 10:43 AM
  3. FindControl for dynamic textfield failing
    By venuc in forum 1.x Help
    Replies: 8
    Last Post: Feb 03, 2010, 11:40 AM
  4. Problem to findcontrol
    By tandis in forum 1.x Help
    Replies: 0
    Last Post: Jul 15, 2009, 7:25 AM
  5. [FIXED] [V0.6] .FindControl no longer required
    By geoffrey.mcgill in forum Bugs
    Replies: 0
    Last Post: Feb 12, 2008, 6:49 PM

Tags for this Thread

Posting Permissions