[CLOSED] It is null my dynamic control with X.GetCmp in ServerSide

  1. #1

    [CLOSED] It is null my dynamic control with X.GetCmp in ServerSide

    Last edited by geoffrey.mcgill; Jan 03, 2014 at 6:03 AM. Reason: [CLOSED]
  2. #2
    Hi @osef,

    X.GetCmp() can retrieve only a real control. Internally it uses the FindControl method. So, you don't recreate the CalendarPanel during a DirectEvent, therefore it returns null.

    You could use X.GetCmp<CalendarPanel>(), but it creates a proxy control. Not a real one. It won't contain all the settings of your real CalendarPanel. I don't think it is helpful in your case.

    Please clarify why do you need a CalendarPanel instance inside those DirectEvents?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @osef,

    X.GetCmp() can retrieve only a real control. Internally it uses the FindControl method. So, you don't recreate the CalendarPanel during a DirectEvent, therefore it returns null.

    You could use X.GetCmp<CalendarPanel>(), but it creates a proxy control. Not a real one. It won't contain all the settings of your real CalendarPanel. I don't think it is helpful in your case.

    Please clarify why do you need a CalendarPanel instance inside those DirectEvents?
    Hi Daniil, It is necessary in the dfFecha_Change, the other DirectEvent It is not necessary, because, When the datetime is changing the EventStore in the each CalendarPanel should display new events.

    But, if there is another way to do, I'll appreciate.

    Thanks
  4. #4
    Yes, I think that in your scenario where is no alternative rather recreating the controls.
  5. #5
    Last edited by osef; Dec 30, 2013 at 4:44 PM.
  6. #6
    As far as can understand you should do the following:
    protected void Page_Load(object sender, EventArgs e)
    {
        AgregarCalendarios();
    }
    Last edited by Daniil; Dec 31, 2013 at 7:11 AM.
  7. #7
    Quote Originally Posted by Daniil View Post
    As far as can understand you should do the following:
    protected void Page_Load(object sender, EventArgs e)
    {
        AgregarCalendarios();
    }

    Thank you Daniil, I neededthe property SetStartDate but, I am continuing with the next error
    http://forums.ext.net/showthread.php...rPanel-dynamic

Similar Threads

  1. Replies: 1
    Last Post: Apr 25, 2013, 6:02 AM
  2. Replies: 11
    Last Post: Feb 18, 2013, 4:15 PM
  3. Replies: 5
    Last Post: Jul 31, 2012, 2:36 PM
  4. Replies: 2
    Last Post: Jun 27, 2011, 12:27 PM
  5. Serverside control in Dataview
    By pooja in forum 1.x Help
    Replies: 0
    Last Post: Oct 15, 2010, 6:53 AM

Tags for this Thread

Posting Permissions