CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

How to put dynamically created frame into JQLayout

by Jorge Sousa » 13 Mar 2018 18:27

Hi

About

It seems to me that in general, if I have an async event (lets say for a button click) and I change properties of another component I would often have to call RenderAsync. Otherwise, how would the button click event know which other controls to re-render? Is that correct? i.e. if I use a button click to populate the items in a listbox or something


You must use only RenderAsync or AjaxReRender = RenderAsync(...,Self)

When

What happens sometimes is that:

Javascript is not generated because the operations are too complex, that's why render async is a good thing, because it renders the html of a region and its children and then uses javascript to add/replace the html to the current page.

for some jquery plugins the javascript is generated, and the plugin had a general setter method, but it doesn't do anything for a given property (is the case of jqgrid column's width).



So the rule is: only user RenderAsync when strictly necessary, ie, if the code you add in an async event its not reflected in the browser.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by davenovo » 13 Mar 2018 21:31

Makes sense, thanks.

You may want to put an edited version of this information in the

https://www.cgdevtools.com/cgforum/viewforum.php?f=5

forum as a help to others.
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by zsleo » 15 Mar 2018 21:10

So the rule is: only user RenderAsync when strictly necessary, ie, if the code you add in an async event its not reflected in the browser.


The problem with this approach is that is programming by "trial and error"
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 16 Mar 2018 10:55

Hi zsleo,

The problem with this approach is that is programming by "trial and error"


Almost all the plugin options (which are under the specific property, e.g: DatePickerOptions, DropDownOptions..) support async change.

All other actions, require AjaxReRender.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 16 Mar 2018 18:28

Alexander,
The philosophical problem with "almost all" is that when you use something that isn't in the "almost all" category it becomes "programming by trial and error".

This is when documentation is all important.

Please don't treat this as a personal issue. It is meant by me with the best intention.
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

Previous

Return to JQLayout

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.