jQWidgets Forums

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: action after loadstate action after loadstate #97129

    drinktea
    Participant

    i write the sample code below to test
    what can i do if i want to alert(finish loading) after “loadstate”
    loadstate did not fire the window.onload event
    thanks again

    <script type=”text/javascript”>
    $(document).ready(function () {
    var data = generatedata(500);
    var source =
    {
    localdata: data,
    datafields:
    [
    { name: ‘name’, type: ‘string’ },
    { name: ‘productname’, type: ‘string’ },
    { name: ‘available’, type: ‘bool’ },
    { name: ‘date’, type: ‘date’},
    { name: ‘quantity’, type: ‘number’ }
    ],
    datatype: “array”
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    $(“#grid”).jqxGrid(
    {

    source: dataAdapter,
    showfilterrow: true,
    filterable: true,
    columnsresize: true,

    selectionmode: “checkbox” ,
    columns: [
    { text: ‘Name’, datafield: ‘name’, width: 215 },

    {
    text: ‘Product’, filtertype: ‘textbox’, datafield: ‘productname’, width: 220
    },
    { text: ‘Available’, datafield: ‘available’, columntype: ‘checkbox’, filtertype: ‘bool’, width: 67 },
    { text: ‘Ship Date’, datafield: ‘date’, filtertype: ‘range’, width: 210, cellsalign: ‘right’, cellsformat: ‘d’ },
    { text: ‘Qty.’, datafield: ‘quantity’, filtertype: ‘number’, cellsalign: ‘right’ }
    ]
    });

    $(‘#savestatebutton’).jqxButton({ height: 25});
    $(‘#loadstatebutton’).jqxButton({ height: 25});
    $(‘#savestatebutton’).click(function () {
    $(“#grid”).jqxGrid(‘savestate’);
    });
    $(‘#loadstatebutton’).click(function () {
    $(“#grid”).jqxGrid(‘loadstate’);
    alert(“It’s loaded!”)
    });
    });
    window.onload = function () { alert(“It’s loaded!”) }
    </script>
    </head>
    <body class=’default’>
    <div id=”grid”>
    </div>
    <input style=”margin-top: 10px;” value=”savestatebutton” id=”savestatebutton” type=”button” />
    <input style=”margin-top: 10px;” value=”loadstatebutton” id=”loadstatebutton” type=”button” />
    </body>
    </html>

    in reply to: action after loadstate action after loadstate #97125

    drinktea
    Participant

    thank for your help
    i have try the
    1.window.onload = function () { alert(“It’s loaded!”) }
    2.var chkReadyState = setInterval(function() {
    if (document.readyState == “complete”) {
    // clear the interval
    clearInterval(chkReadyState);
    // finally your page is loaded.
    alert(‘finish’);
    }
    }, 100);
    but the message shows before loadstate finish rendering the grid


    drinktea
    Participant

    such as the .draggable({ containment}) in jquery


    drinktea
    Participant

    sorry for misunderstanding
    what i mean is that does jqxlistbox has the property with the same function as jqxdragdrop restrictor


    drinktea
    Participant

    thanks for your help ….
    if i put the listbox1 and listbox2 in the same <div>
    is there any way to restrict not only the “drop” region but the “drag” region to the parent <div>
    In the listbox demo page,it’s impossible to drag the item of the listbox over the text “This demo demonstrates the jqxListBox Drag and Drop capabilities. With the jqxListBox’s Drag and Drop, you can reorder items, move items from one ListBox to another or just drop an item anywhere and get its data.”


    drinktea
    Participant

    such as “afterGridCompleteFunc” event in jqgrid


    drinktea
    Participant

    how do i change the row’s height by myself after the grid is loaded and rendered,
    if autorowheight is true?
    if i want to detect and change the row’s height after “autorowheight” finish adjusting the row’s height
    where should i put the row’s height adjusting code?
    i’ve tried the “ready” event
    but it detect the row’s height before “autorowheight” finish adjusting

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