jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Pivot Grid Pivot Grid #52799

    jaxond24
    Participant

    Hello,

    I’m wondering if something like a Pivot Grid was on the development plans? I was looking for a way to build a grid similar to the following, using JQWidgets:

    Grid

    Damian.


    jaxond24
    Participant

    Hello,

    Thank you for the reply. I did think I had tried this, but obviously something wasn’t right. I’ll re-try based on your example, and see how I go.

    Damian.


    jaxond24
    Participant

    Hello,

    Thank you for your reply. I did try using the bindingCOmplete before posting my question here, but I’m new to this stuff and I’m not yet smart enough to figure out what I need to do! I’ve spent some time just now trying again but am still unsure what I need to do. Would you be so kind as to provide some sample code to point me in the right direction?

    Apologies, and thank you.

    Damian.


    jaxond24
    Participant

    Apologies, I just realised I posed this under “ListBox” rather than “DropDownList”.


    jaxond24
    Participant

    Here is some code based on a demo:

    $(document).ready(function () {

    // prepare the data
    var progInstSource =
    {
    datatype: “json”,
    datafields: [
    { name: ‘programInstID’, type: ‘int’},
    { name: ‘programInstDate’, type: ‘date’, cellsformat: ‘F’}
    ],
    url: “bodyProgInstData.php”,
    async: false
    };

    var programDataAdapter = new $.jqx.dataAdapter(progInstSource);

    // create a DropDownList
    // The displayMember specifies that the list item’s text will be the Employee’s Name.
    // The valueMember specifies that the list item’s value will be the Employee’s ID.
    $(“#jqxListBox”).jqxDropDownList(
    {
    width: 350,
    height: 25,
    source: programDataAdapter,
    promptText: ‘Select a Program:’,
    selectedIndex: -1,
    displayMember: ‘programInstDate’,
    valueMember: ‘programInstID’
    });

    $(“#jqxListBox”).bind(‘select’, function(event)
    {
    var programInstID = event.args.item.value;
    var warmUpSource =
    {
    datatype: “json”,
    datafields: [
    { name: ‘warmUpNo’, type: ‘int’},
    { name: ‘warmUpSet’, type: ‘int’},
    { name: ‘warmUpRep’, type: ‘int’},
    { name: ‘warmUpWeight’, type: ‘int’},
    { name: ‘warmUpActivity’, type: ‘string’}
    ],
    type: ‘POST’,
    data: {programInstID:programInstID},
    url: “bodyProgWarmUpData.php”,
    };

    var dataAdapter = new $.jqx.dataAdapter(warmUpSource);
    $(“#warmUpGrid”).jqxGrid({
    source: dataAdapter,
    width: ‘100%’,
    autoheight: true,
    editable: true,
    columns:
    [
    {datafield: “warmUpNo”, text: “#”, width: ’10px’},
    {datafield: “warmUpSet”, text: “Sets”, width: ’50px’},
    {datafield: “warmUpRep”, text: “Reps”, width: ’50px’},
    {datafield: “warmUpWeight”, text: “Weight”, width: ’80px’},
    {datafield: “warmUpActivity”, text: “Activity”, width: ‘395px’}
    ]
    });
    });
    });

    </script>
    </head>

    <body>
    <div style=”margin-bottom: 20px;” id=”jqxListBox”></div>
    <div id=”warmUpGrid”></div>
    </body>

    in reply to: Select chart via radio button Select chart via radio button #50329

    jaxond24
    Participant

    Hello Dimitar,

    Thank you very much! That seems perfect. I’m comparing the original sample code to what you’ve pasted in your reply so I can understand how they differ and how they work. I’m doing my best to learn, and I appreciate your help.

    Thank you again,
    Damian.

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