jQuery UI Widgets Forums Layouts Panel and Responsive Panel Passing JSON data to jqxPanel

This topic contains 6 replies, has 2 voices, and was last updated by  Hristo 8 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Passing JSON data to jqxPanel #86749

    walker1234
    Participant

    So far I have been using jqxgrid and passing my json data to it using the datafield property. I want to display the value of one of the JSON key in the jqxPanel and looking at the various examples and API reference like the one here , I only see few properties. How should I achieve something like the following that I used to achieve via jqxgrid.

    $("#contentPanel").jqxPanel({
    
                      // source: dataAdapter,
                       width: '400',
                       height: '350',
                       scrollBarsize:20,
                      datafield: 'document_content'
                                           
                          
                          
                           
                       ]
                    });

    Secondly, do I need to download an specific library for the jqxPanel?

    Passing JSON data to jqxPanel #86766

    Hristo
    Participant

    Hello walker1234,

    About jqxPanel and jqxGrid they has different way to generate.
    jqxPanel do not have such property – datafield.
    You could generate relevant structure with DataAdapter and after this to create instance of jqxPanel.
    Please, take a look this example:
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdataadapter/bindingtojson.htm?light

    You do not need to download specific library.
    If you would like to use small size for your project only include files that depend to particular widget, otherwise could use jqx-all.js.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Passing JSON data to jqxPanel #86786

    walker1234
    Participant

    Thanks for your reply. Do you have any example which shows jQPanel and populating data in the same manner I mentioned?

    Passing JSON data to jqxPanel #86787

    walker1234
    Participant

    A more detailed example will be helpful. I believe I am already till the point where I have used dataAdapter as shown below:

    `var source =
    {
    localdata: mydata_,
    datatype : “array”
    };
    var dataAdapter = new $.jqx.dataAdapter(source, {
    loadComplete: function (data) { },
    loadError: function (xhr, status, error) {
    } `

    Passing JSON data to jqxPanel #86798

    Hristo
    Participant

    Hello walker1234,

    Please, take a look this example:
    http://jsfiddle.net/utef7j07/

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Passing JSON data to jqxPanel #86823

    walker1234
    Participant

    Thanks Hristo for the example. That helped me in getting the content into the panel.One problem I am facing is related to the scrollbar. I have 516 words document that is supposed to go inside the Panel and I am using the following parameters to define the boundaries of the panel:

    $("#myPanel").jqxPanel({ width: '750',height: '500'});

    But the document only shows 102 words and that’s it. It’s locked from the bottom, i.e., no scrollbar to see the rest of the document.I tried adding scrollBarSize:20 parameter but that didn’t change anything. Could you tell me why is it happening?

    Passing JSON data to jqxPanel #87002

    Hristo
    Participant

    Hello walker1234,

    Could you provide us example that demonstrate this issue? (if it is possible in https://www.jseditor.io/)

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.