Sep 03, 2012, 1:49 PM
[CLOSED] Tablegrid content update from listener
Hi,
Having some difficulties changing the content of the tablegrid:
When clicking on a commandbutton in a grid I call the following handler:
So clicking on the commandbutton opens a window with a different TableGrid layout
This is the window I would like to change the content:
Sorry that I can't give you up and running code, but the code is part of a large project with a lot of references.
Simple said. It looks like that the TableGrid needs some kind of refresh ?
Martin
Having some difficulties changing the content of the tablegrid:
When clicking on a commandbutton in a grid I call the following handler:
<Command Handler="if (#{windBerekening}){#{windBerekening}.hide();};#{pnlBerekening}.update(record.data.Berekening);#{winBerekening}.show();" />
In the store (record.data.Berekening) there is a different HTML table in every record.So clicking on the commandbutton opens a window with a different TableGrid layout
This is the window I would like to change the content:
<ext:Window ID="winBerekening" runat="server" Title="Berekening" Icon="Calculator"
Height="320px" Width="900px" BodyStyle="background-color: #fff;" Padding="5"
Hidden="true">
<Items>
<ext:TableGrid ID="tgBerekening" runat="server" Table="data" StripeRows="true" Width="900" />
<ext:Panel ID="pnlBerekening" runat="server">
<Content>
<table style="visibility: hidden;" id="data">
<thead>
<tr>
<th>
Omschrijving
</th>
<th>
</th>
<th>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Ingangsdatum contract
</td>
<td>
:
</td>
<td>
05-03-2011
</td>
</tr>
<tr>
<td>
Actuele looptijd (dgn)
</td>
<td>
:
</td>
<td>
545 dagen
</td>
</tr>
<tr>
<td>
Actuele looptijd (mnd)
</td>
<td>
:
</td>
<td>
17,9 maanden
</td>
</tr>
<tr>
<td>
Kilometers toegestaan
</td>
<td>
:
</td>
<td>
44750 km
</td>
</tr>
<tr>
<td>
Kilometers werkelijk
</td>
<td>
:
</td>
<td>
66908 km
</td>
</tr>
<tr>
<td>
Kilometers afwijking (pct)
</td>
<td>
:
</td>
<td>
(([Kilometers werkelijk] - [Kilometers toegestaan]) / [Kilometers toegestaan]) *
100 = ((66908 - 44750) / 44750) * 100 = 49,5%
</td>
</tr>
<tr>
<td>
Kilometers verschil (abs)
</td>
<td>
:
</td>
<td>
[Kilometers werkelijk] - [Kilometers toegestaan] = 66908 - 44750 = 22158 km
</td>
</tr>
<tr>
<td>
Kilometers verschil (abs) per jaar
</td>
<td>
:
</td>
<td>
([Kilometers verschil (abs)] / [Actuele looptijd (mnd)]) * 12 = (22158 / 17,9) *
12 = 14855 km
</td>
</tr>
<tr>
<td>
Score (lookup pct)
</td>
<td>
:
</td>
<td>
49,5 = 1
</td>
</tr>
<tr>
<td>
Score (lookup abs)
</td>
<td>
:
</td>
<td>
14855 = 1
</td>
</tr>
<tr>
<td>
Score
</td>
<td>
:
</td>
<td>
([Score (lookup pct)] * [GewichtPct]) + ([Score (lookup abs)] * [GewichtKm]) = (1
* 50%) + (1 * 50%) = 1
</td>
</tr>
<tr>
<td>
Score (lookup kleur)
</td>
<td>
:
</td>
<td>
1 = Rood
</td>
</tr>
</tbody>
</table>
</Content>
</ext:Panel>
</Items>
</ext:Window>
I receive no errors and when using an alert I can see that I've the correct record.data.Berekening. But still.. the window shows the initial table content. The content of the label is never updated.Sorry that I can't give you up and running code, but the code is part of a large project with a lot of references.
Simple said. It looks like that the TableGrid needs some kind of refresh ?
Martin
Last edited by Daniil; Sep 04, 2012 at 8:40 AM.
Reason: [CLOSED]