Jump to content


Photo

Opposite of AddJs (instead of setting data, reading data )


  • Please log in to reply
1 reply to this topic

#1 Richard

Richard

    Member

  • uniGUI Subscriber
  • PipPip
  • 27 posts

Posted 21 January 2017 - 02:21 PM

Hi,
 
I'm now using this in Delphi-COde to set the activeview of a Calendar component.
 
    UniSession.AddJS(calCalendar.JSName + '.setActiveView(0);');
 
Wat is the oppositie to read the Activeiew (function is called GetActiveView)
 
    xxxxxxJS(calCalendar.JSName + '.getActiveView();');

  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5165 posts

Posted 22 January 2017 - 02:52 PM

Wat is the oppositie to read the Activeiew (function is called GetActiveView)
 
    xxxxxxJS(calCalendar.JSName + '.getActiveView();');

 

 

Hi,

 

You can use viewchange function for this, and use OnAjaxEvent

 

UniCalendarPanel1 -> ClientEvents -> ExtEvents -> function viewchange:

function viewchange(sender, view, info, eOpts)
{
    ajaxRequest(sender, '_viewchange', ['xtype='+view.xtype]);
}

Best regards.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users