-
April 21st, 2009, 12:58 PM
#1
How to identify the table that contains an item
Hi,
i've seeing the examples and trying to modify them for test, and i have a doubt.
I want to do this:
a page with a list of items, but knowing that one of the items must appear twice. (lets call it 'itemX')
The only way i have found to do this is defining two tables, one of them (Table A) with the whole list (with itemX only once) , and another table (Table B) only with itemX.
Is this the only way to resolve it?
I've test it and works fine, but then, i found another problem.. each update, the function "formatValues" makes changes in the styles of the items, but i want some changes in the items of "Table A" and another kind of changes in the items of "Table B"..
I want to use the same function "formatValues" for both tables... but how can i know which table belong each item inside this function??
Thanks
-
April 22nd, 2009, 10:17 AM
#2
Indeed, using multiple cells associated with the same item/field pair is not supported by the web client library, so you had to use different tables.
Alternatively, you could have supplied the item list to your table in an explicit way, through an array, with itemX included twice;
then, you should have addressed the two instances of itemX in your cells by position.
You can access to the table related to each invocation of "formatValues" through the "this" pointer. You could identify the table object by decorating it in some way or by taking advantage of the "getId" method.
-
April 22nd, 2009, 11:02 AM
#3
As an alternative, you can leverage "extra fields".
More details here: http://www.lightstreamer.com/vb/faq....#faq_rep_items
Similar Threads
-
By betasec in forum Client SDKs
Replies: 1
Last Post: February 21st, 2011, 10:03 AM
-
By hungtt in forum Adapter SDKs
Replies: 2
Last Post: December 24th, 2010, 07:51 AM
-
By AidasOzelis in forum Client SDKs
Replies: 13
Last Post: June 3rd, 2010, 01:13 PM
-
By EWANG in forum Client SDKs
Replies: 1
Last Post: August 19th, 2009, 10:17 AM
-
By georgeeapen in forum Client SDKs
Replies: 2
Last Post: April 21st, 2009, 11:17 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 03:30 AM.
Bookmarks