-
December 14th, 2007, 03:47 AM
#1
VisualTable = How to capture value?
I created a DynaMetapushTable and display in the page by code the following:
<tr class="lscold" id="info" height="10" source="lightstreamer">
<td nowrap height="10"><div source="lightstreamer" field="1"></div></td>
<td nowrap height="10"><div source="lightstreamer" field="3"></div></td>
.... ETC.
let's say that the page will display order requests which will updated automatically (ADD, UPDATE, DELETE).
My problem is: If i want to modify a screen table record by double-clicking the row, I could not get the row-field value which I will use as a key to retrieve the complete information from the server and displayed in screen to edit.
if you notice, in the StockListDemo webclient sample, it's use an array index value (('+i+') as a key to retrieve the complete data. IT'S NOT USE ==== openPopup(item'+i+')
document.write('<td nowrap style="text-align: left"><a href="#" onClick="return openPopup('+i+')">
<div class="stockname'+suff+'" source="lightstreamer" table="1" item="'+i+'" field="12">Loading...</div></a></td>');
Anyone can help???
-
December 17th, 2007, 10:14 AM
#2
Hi
In the StockListDemo example, the table is static and each row can be differentiated by its own defining code.
With a DynaMetapush table, on the other hand, the table rows are created by Lightstreamer library code and indeed no special information is put on each row by library code to differentiate them. However, each row is characterized by a specific value for the "KEY" field and custom code can take advantage of this value.
The simplest way to differentiate the rows from custom code is by implementing the onChangingValues event handler; the handler is invoked each time a row changes and receives all row data and a pointer to the DOM element for the row, allowing you to extend the element based on the row values (you can only modify the external part of the row element tree, not the push cells contained). Probably, you just need to do this upon row creation, that is when the "COMMAND" field is "ADD".
Dario
Similar Threads
-
By genkijo in forum Client SDKs
Replies: 1
Last Post: July 20th, 2010, 09:20 AM
-
By cbrogliato in forum Client SDKs
Replies: 6
Last Post: May 8th, 2010, 09:14 PM
-
By hofmanna in forum Client SDKs
Replies: 3
Last Post: January 21st, 2010, 12:25 PM
-
By tuongkha in forum Client SDKs
Replies: 9
Last Post: July 9th, 2008, 09:27 AM
-
By tuongkha in forum Client SDKs
Replies: 19
Last Post: July 8th, 2008, 09:16 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 11:50 PM.
Bookmarks