What is the wrong of this code ? and did the data type of columns affect on the display ?

What is the wrong of this code ? and did the data type of columns affect on the display ?

Mohamed gawadMohamed gawad Posts: 1Questions: 1Answers: 0
edited March 2016 in Free community support

this is javascript function :

[Code]
oTable = $('#symbolsTable').DataTable(
{
scrollY : '50vh',
scrollX : '50vh',
"bJQueryUI" : true,
scrollCollapse : true,
paging : false,
"bFilter" : false,
"deferRender" : true,
"data" : currentsymbols,
"Columns" : [ {
"data" : 'id'
}, {
"data" : 'descriptionEn'
},{
"data" : 'open'
}, {
"data" : 'lastTradePrice'
}, {
"data" : 'change'
}, {
"data" : 'perce_change'
}, {
"data" : 'mbp_bid1'
}, {
"data" : 'mbp_bid1_qty'
}, {
"data" : 'mbp_ask1'
}, {
"data" : 'mbp_ask1_qty'
}, {
"data" : 'volume'
}, {
"data" : 'vwap'
} ]
,
"columnDefs" : [ {
"targets" : 0,
"searchable" : false,
"orderable" : false,
"className" : 'dt-body-center',
"render" : function(data,
type, full, meta) {
return '<input type="checkbox" >';
}
}
]
});
[/Code]

currentsymbols : is variable written in json string as this :

[{"id":"1120","shortDescriptionEn":"Al Rajhi","shortDescriptionAr":"???????","descriptionEn":"Al Rajhi Bank","descriptionAr":"???? ???????","sector":"TBFSI","previousClosed":0,"open":75,"lastTradePrice":0,"change":0,"perce_change":0,"mbp_bid1":0,"mbp_bid1_qty":0,"mbp_ask1":0,"mbp_ask1_qty":0,"noOfTrades":0,"volume":0,"turnOver":0,"vwap":0,"high":0,"low":0,"tradable":false,"loser":false,"settlementDays":0,"loserAlert":false,"tradableRight":false,"tradableRightAlert":false},{"id":"1020","shortDescriptionEn":"BJAZ","shortDescriptionAr":"???????","descriptionEn":"Bank Aljazira","descriptionAr":"??? ???????","sector":"TBFSI","previousClosed":0,"open":20.25,"lastTradePrice":0,"change":0,"perce_change":0,"mbp_bid1":0,"mbp_bid1_qty":0,"mbp_ask1":0,"mbp_ask1_qty":0,"noOfTrades":0,"volume":0,"turnOver":0,"vwap":0,"high":0,"low":0,"tradable":false,"loser":false,"settlementDays":0,"loserAlert":false,"tradableRight":false,"tradableRightAlert":false},{"id":"1150","shortDescriptionEn":"Alinma","shortDescriptionAr":"???????","descriptionEn":"Alinma Bank","descriptionAr":"???? ???????","sector":"TBFSI","previousClosed":0,"open":13.6,"lastTradePrice":0,"change":0,"perce_change":0,"mbp_bid1":0,"mbp_bid1_qty":0,"mbp_ask1":0,"mbp_ask1_qty":0,"noOfTrades":0,"volume":0,"turnOver":0,"vwap":0,"high":0,"low":0,"tradable":false,"loser":false,"settlementDays":0,"loserAlert":false,"tradableRight":false,"tradableRightAlert":false},{"id":"2010","shortDescriptionEn":"SABIC","shortDescriptionAr":"????","descriptionEn":"Saudi Basic Industries Corp","descriptionAr":"?????? ???????? ???????? ????????","sector":"TPISI","previousClosed":0,"open":80.25,"lastTradePrice":0,"change":0,"perce_change":0,"mbp_bid1":0,"mbp_bid1_qty":0,"mbp_ask1":0,"mbp_ask1_qty":0,"noOfTrades":0,"volume":0,"turnOver":0,"vwap":0,"high":0,"low":0,"tradable":false,"loser":false,"settlementDays":0,"loserAlert":false,"tradableRight":false,"tradableRightAlert":false}]

Answers

  • allanallan Posts: 63,783Questions: 1Answers: 10,511 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

This discussion has been closed.