Hi,
i would like to know how data-replica attribute must be used in a StaticGrid. I can see that this is mentioned in documentation, but it seems not used in any of the available examples.
Have anyone some example about this?
Regards
Printable View
Hi,
i would like to know how data-replica attribute must be used in a StaticGrid. I can see that this is mentioned in documentation, but it seems not used in any of the available examples.
Have anyone some example about this?
Regards
Hi davook,
Please consider our Basic StockList example; you could duplicate a field maybe because you want to format it in two different ways.
In the static grid definition the code will be something like this:
In this way in the onVisualUpdate callback you can directly access the cells separatelyHTML Code:<td><div data-source="lightstreamer" data-field="ask" data-replica="ask-A">-</div></td>
<td><div data-source="lightstreamer" data-field="ask" data-replica="ask-B">-</div></td>
Regards,Code:var newValue = info.getChangedFieldValue(field);
if (newValue != null) {
info.setCellValue("ask", myValueFormattedFlavourA(newValue), "ask-A");
info.setCellValue("ask", myValueFormattedFlavourB(newValue), "ask-B");
}
Giuseppe
Hi Giusseppe,
i got it, thank you for the explanation.
regards