Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jul 2009
    Location
    portugal
    Posts
    2

    data-replica attribute in StaticGrid

    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

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    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:
    HTML 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>
    In this way in the onVisualUpdate callback you can directly access the cells separately
    Code:
           var newValue = info.getChangedFieldValue(field);
           if (newValue != null) {   
           info.setCellValue("ask", myValueFormattedFlavourA(newValue), "ask-A");
           info.setCellValue("ask", myValueFormattedFlavourB(newValue), "ask-B");
           }
    Regards,
    Giuseppe

  3. #3
    Member
    Join Date
    Jul 2009
    Location
    portugal
    Posts
    2
    Hi Giusseppe,

    i got it, thank you for the explanation.

    regards

 

 

Similar Threads

  1. StaticGrid updates: get old/new values
    By darch in forum Client SDKs
    Replies: 0
    Last Post: March 14th, 2013, 03:59 PM
  2. Passing data dynamicatlly to Java Data Adapter via
    By V S Suresh in forum Adapter SDKs
    Replies: 2
    Last Post: October 25th, 2012, 09:11 AM
  3. Replies: 3
    Last Post: September 28th, 2012, 11:02 AM
  4. Single data provider and multiple data sources
    By pluczak in forum Adapter SDKs
    Replies: 1
    Last Post: April 26th, 2012, 11:50 AM
  5. General data and User specific data
    By mnenchev in forum Adapter SDKs
    Replies: 5
    Last Post: September 1st, 2009, 10:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 01:04 PM.