-
June 7th, 2012, 02:29 PM
#1
on field missing error on javascript execution
Hi
i use with lightstreamer version 4 the code below
to change the image to a user field #arrow
if (updateInfo.isValueChanged("p_last")) {
var val = updateInfo.getNewValue("p_dif");
if (val.indexOf("-") > -1) {
updateInfo.addField("#arrow",imgDown);
} else {
updateInfo.addField("#arrow",imgUp);
}
}
with version 5 Colosseo it is possible with StaticGrid to change image for a field up/down !?
and in version 5 the arrow field is without # is this important !!!??
because i have some calculated fields , like #value = quantity * last_price
i have to use DynaGrid or it is posible with StaticGrid !!??
with the code below the images with StaticGrid are not changing
//put arrow and handle change style
var pctChange = info.getChangedFieldValue("p_chng");
if (pctChange !== null) {
pctChange = formatDecimal(pctChange,2,true)+"%";
hotTxtCol = (pctChange.charAt(0) == '-') ? "#dd0000" : "#009900";
if (pctChange.indexOf("-") > -1) {
info.setCellValue("#arrow",imgDown);
info.setCellAttribute("#arrow",cold,cold,"backgrou ndColor");
info.setCellAttribute("p_chng","black",hotTxtCol," color");
info.setCellValue("p_chng",pctChange);
} else {
info.setCellValue("#arrow",imgUp);
info.setCellAttribute("#arrow",cold,cold,"backgrou ndColor");
info.setCellAttribute("p_chng","black",hotTxtCol," color");
info.setCellValue("p_chng","+"+pctChange);
}
info.setCellAttribute("p_chng","bold","bold","font Weight");
}
-
June 8th, 2012, 08:52 AM
#2
Hi betasec,
This question has already been discussed in this thread.
Did you mean to ask a different question?
Similar Threads
-
By pluczak in forum Client SDKs
Replies: 1
Last Post: April 3rd, 2012, 09:36 AM
-
By nickponico in forum General
Replies: 1
Last Post: March 1st, 2010, 09:38 AM
-
By Test6405 in forum Client SDKs
Replies: 1
Last Post: November 2nd, 2009, 04:55 PM
-
By rsouissi in forum Client SDKs
Replies: 1
Last Post: August 27th, 2007, 11:24 AM
-
By sukhdev in forum Client SDKs
Replies: 2
Last Post: July 20th, 2007, 05:44 PM
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 05:24 PM.
Bookmarks