|
<< Click to Display Table of Contents >> Navigation: Telegram > 2020 > 07 > 02 > Telegram_2020-07-02T20 |
2020-07-02T20:09:18
It should be execute after the component is rendered. Or the page is refreshed.
2020-07-02T20:09:46
Because that method could be in templates
2020-07-02T20:11:56
Check the template and you will see it it calls that jQuery intialization method.
2020-07-02T20:12:27
If you see the event where it is called is in the OnReady event of the html document. Which is executed when the page is finished loaded
2020-07-02T20:12:42
Ok I am checking
2020-07-02T20:20:26
Ok I now know the reason and I would ask Alexandre to add OnClick event. I was using OnAsyncClick and it was not rendering the page. I have tried OnChange event and it works perfectly. So I would ask Alexandre to add OnClick event to refresh the page because OnAsyncClick does not.
2020-07-02T20:22:07
Async does not refresh the page, it is not intended to do that
2020-07-02T20:22:29
it is intended to do partial updates
2020-07-02T20:22:35
OnChange event works but it limited in action because it is triggered only when you change options
2020-07-02T20:22:42
whct Onclick event?
2020-07-02T20:23:22
there is a an async event for the grid to refresh the data
2020-07-02T20:23:44
We need OnClick event that is missing from IWForm
2020-07-02T20:24:33
IWForm?
2020-07-02T20:25:06
Sorry not IWForm but IWComboBox
2020-07-02T20:25:33
but why you need to fullsubmit a page only to refresh your grid?
2020-07-02T20:25:53
just call IWGrid.RefreshAsync inside the OnAsyncClick event
2020-07-02T20:26:23
Ok I will try it
2020-07-02T20:27:37
cant remeber if it is RefreshAsync or Refresh, btu is si better looking to do an Async refresh rather than doing a full submit
2020-07-02T20:27:57
I am checking now
2020-07-02T20:39:22
IWGrid refresh or RefreshAsync do not work. Logically, because the page is loading from a Template, only page reload can trigger DataTable formatting from Template. That is why OnChange event of IWComboBox works however I would prefer OnClick.
2020-07-02T20:43:40
I have just checked the demo from Jose and it is OnChange event that is applied not On AsyncClick
2020-07-02T20:46:40
Hi Jose! I now know the reason; OnAsyncClick event of IWComboBox does not reload the Template. OnChange event does but it could be better if OnClick event was added to IWCOMBOBOX
2020-07-02T20:48:08
Put an JavaScript callbackResponse in the onAyncClick to reload the data
2020-07-02T20:49:24
How? Sorry for asking
2020-07-02T20:50:33
does the combobox chnages the structure of the grid? or only the records?
2020-07-02T20:51:34
The structure is the same but only data do change
2020-07-02T20:52:28
There is no need to to add an OnCikEvent, if the IWgrid will be refreshed only when you change the option.
2020-07-02T20:52:50
why you need to reload the the iwgrid data when cliking on a combobox?
2020-07-02T20:54:06
Because data are loaded by on the SelectedValue from IWCOMBOBOX
2020-07-02T20:54:11
I mean, Alex could add the event, i think it is just not published, but just want to know the logic about that. Check in you code if you can call the method comboxbox.onClick := xx
2020-07-02T20:56:11
No it is not implemented
2020-07-02T20:56:45
So it is better to use OnChange. Isn't?
2020-07-02T20:57:40
I think it is better to ask Alex how to reload iwdatagrid in an async way, rather than asking to add an OLD way OnClick event.
2020-07-02T20:58:47
Yes OnChange works but it is not ideal solution when you have only one item in the IWComboBox. You need a list two items and you can move from one to another to make it work