Nov 08, 2014, 6:34 AM
gridpanel commands with javascript
I need to have a gridpanel with these 3 options on it:
1) each time the user clicks on the row(any column except the next 2 columns), it needs to fire a client chart reload(this chart is inside the same page below the gridpanel) (cht.store.reload(); cht.redraw();)
2) in the same row of the grid, I need to have a column (button or command or image), when the user clicks on it, it must activate a tabpanel's panel and change the title of it ( tabpanel.setActiveTab(panel);panel.setTitle(tl);)
3) in the same row of the grid, I need to have a column(button or command or image), when the user clicks on it, this must happen an onevent cycle, like the next:
Summary:
- on select or click the row triggers a javascript
- on click on a command button, triggers a javascript
- on click on a command button, fires a directevent call
So, how can I achieve this?
1) each time the user clicks on the row(any column except the next 2 columns), it needs to fire a client chart reload(this chart is inside the same page below the gridpanel) (cht.store.reload(); cht.redraw();)
2) in the same row of the grid, I need to have a column (button or command or image), when the user clicks on it, it must activate a tabpanel's panel and change the title of it ( tabpanel.setActiveTab(panel);panel.setTitle(tl);)
3) in the same row of the grid, I need to have a column(button or command or image), when the user clicks on it, this must happen an onevent cycle, like the next:
<DirectEvents>
<CellClick OnEvent="grdPShow" Success="top.GApp.wndHdr(#{wndP},2);">
<EventMask ShowMask="true" CustomTarget="={#{grdP}.body}" />
<ExtraParams>
<ext:Parameter Name="xP" Value="record.getId()" Mode="Raw" />
</ExtraParams>
</CellClick>
</DirectEvents>
Summary:
- on select or click the row triggers a javascript
- on click on a command button, triggers a javascript
- on click on a command button, fires a directevent call
So, how can I achieve this?
Last edited by Daniil; Nov 10, 2014 at 12:57 PM.