jQWidgets Forums

jQuery UI Widgets Forums Plugins Data Adapter dynamic Adapter

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • dynamic Adapter #52476

    simcon94
    Participant

    Hi,
    i have a dynmic DataAdapter:

    var source = {
                datatype: "json"
                , async: false
                , datafields: []
                , url: getAppDomainAppVirtualPath() + "GetTableData"
            }; 

    Json:
    [{"Datum": "03/2014","Value1": "8.734.909,45","Value2": "88.659.330,87"},{"Datum": "04/2014","Value1": "31.640,42","Value2": "321.150,24"},{"Datum": "Summe","Value1": "8.766.549,86","Value": "88.980.481,11"}]

    So my Problem is, when i sorted the grid with value, it doesn’t work correct.´, because the cell will be interpreted as string.
    Now, i have to set the value as number…..but how?
    Can i do this in loadComplete in dataAdpater?

    dynamic Adapter #52487

    Peter Stoev
    Keymaster

    Hi simcon94,

    The “datafields” member should point to an Array of data fields as pointed out in the Documentation. Each data field should have “name” and “type”. The “type” could be “string”, “number”, “date” and “boolean”. That is a basic requirement when you work with dataAdapter.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.