jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 47 total)
  • Author
    Posts

  • Makla
    Participant

    I don’t understand this. First is OK and second is with error.

    tree.jqxTree('addTo', { label: 'Item', value: 'value' }, $element[0]);	//OK
    tree.jqxTree('addTo', { label: 'Item', value: 'value', items: [{label: "Nalagam...", value: "nalagam"}]}, $element[0]); //error

    Makla
    Participant

    Why is this not OK?

    var items = new Array();
    items.push({label: 'l', value: 'v', items: [{label: "Nalagam...", value: "nalagam"}]})
    tree.jqxTree('addTo', items, $element[0]);

    I am loading all kind of staff on demand. So I want to create items manually. I don’t see any difference between my code and the example code. My code is based on: load on demand example.


    Makla
    Participant

    I get error: Uncaught TypeError: Cannot set property ‘level’ of undefined.
    Details:

    Uncaught TypeError: Cannot set property ‘level’ of undefined jqx-all.js:7
    a.extend._refreshMapping jqx-all.js:7
    e jqx-all.js:7
    a.extend.addTo jqx-all.js:7
    a.jqx.invoke jqx-all.js:7
    a.jqx.jqxWidgetProxy jqx-all.js:7
    (anonymous function) jqx-all.js:7
    b.extend.each jquery-1.9.1.min.js:3
    b.fn.b.each jquery-1.9.1.min.js:3
    a.fn.(anonymous function) jqx-all.js:7
    (anonymous function) test.php:39
    b.event.dispatch jquery-1.9.1.min.js:3
    v.handle jquery-1.9.1.min.js:3
    b.event.trigger jquery-1.9.1.min.js:3
    (anonymous function) jquery-1.9.1.min.js:4
    b.extend.each jquery-1.9.1.min.js:3
    b.fn.b.each jquery-1.9.1.min.js:3
    b.fn.extend.trigger jquery-1.9.1.min.js:4
    a.extend._raiseEvent jqx-all.js:7
    (anonymous function) jqx-all.js:7
    r.complete jquery-1.9.1.min.js:5
    c jquery-1.9.1.min.js:3
    p.fireWith jquery-1.9.1.min.js:3
    u jquery-1.9.1.min.js:5
    b.fx.tick jquery-1.9.1.min.js:5

    Source code:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="Framework/Scripts/jquery-1.9.1.min.js"></script>
    <script src="Framework/Scripts/jqwidgets/jqx-all.js"></script>
    <link rel="stylesheet" href="Framework/Styles/jqx.base.css" type="text/css" />
    <script type="text/javascript">
    $(document).ready(function () {
    // Create jqxTree
    var tree = $('#jqxTree');
    var source = [{ label: "Root", expanded: true,
    items: [
    { label: "Root Folder 1", items: [{ value: "ajax1.htm", label: 'Loading...'}] },
    { label: "Root Folder 2", items: [{ value: "ajax2.htm", label: 'Loading...'}] }
    ]
    }];
    tree.jqxTree({ source: source, width: 200 });
    tree.bind('expand', function (event) {
    var label = tree.jqxTree('getItem', event.args.element).label;
    var $element = $(event.args.element);
    var loader = false;
    var loaderItem = null;
    var children = $element.find('ul:first').children();
    $.each(children, function () {
    var item = tree.jqxTree('getItem', this);
    if (item && item.label == 'Loading...') {
    loaderItem = item;
    loader = true;
    return false
    };
    });
    if (loader)
    {
    var items = new Array();
    items.push({label: 'l', value: 'v', items: [{label: "Nalagam...", value: "nalagam"}]})
    tree.jqxTree('addTo', items, $element[0]);
    tree.jqxTree('removeItem', loaderItem.element);
    }
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id="jqxTree">
    </div>
    </body>
    </html>

    Makla
    Participant

    Has these feature been implemented.
    I get:

    Uncaught TypeError: Cannot set property ‘level’ of undefined jqx-all.js:7
    a.extend._refreshMapping jqx-all.js:7
    a.extend.addTo.e jqx-all.js:7
    a.extend.addTo jqx-all.js:7
    a.jqx.invoke jqx-all.js:7
    a.jqx.jqxWidgetProxy jqx-all.js:7
    a.jqx.jqxWidget.a.fn.(anonymous function) jqx-all.js:7
    b.extend.each jquery-1.9.1.min.js:3
    b.fn.b.each jquery-1.9.1.min.js:3
    a.jqx.jqxWidget.a.fn.(anonymous function) jqx-all.js:7

    when trying this:
    ColumnsTreePluses.jqxTree(‘addTo’, {label: ‘Hi’, value: ‘v1’, items: [{label: “Loading…”, “test_value”]}, element[0]);

    in reply to: Remove all html source Remove all html source #20914

    Makla
    Participant

    I am sorry. My mistake. It does clear all sources.
    Works as expected. 🙂

    in reply to: Remove all html source Remove all html source #20824

    Makla
    Participant

    Apparently Destroy removes any childs html from DOM, but not the Window itself. Is this correct?
    To do that I need to manually remove

    <div id="window1">

    from body, or there is another way?


    Makla
    Participant

    Understand. I also try to manually reference function on document load:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Pametna hiša</title>
    <script src="Framework/Scripts/jquery-1.9.1.min.js"></script>
    <script src="Framework/Scripts/date.format.js"></script>
    <script src="Framework/Scripts/knockout-2.2.1.js"></script>
    <script src="Framework/Scripts/FormModel.js"></script>
    <script src="Framework/Scripts/jqwidgets/jqx-all.js"></script>
    <script type="text/javascript" src="Framework/Scripts/jqwidgets/jquery.global.js"></script>
    <link rel="stylesheet" href="Framework/Styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="Framework/Styles/jqx.ui-sunny.css" type="text/css" />
    <script type="text/javascript">
    $(document).ready(function () {
    var initialData = [
    { name: "Well-Travelled Kitten", sales: 352, price: 75.95 },
    { name: "Speedy Coyote", sales: 89, price: 190.00 },
    { name: "Furious Lizard", sales: 152, price: 25.00 },
    { name: "Indifferent Monkey", sales: 1, price: 99.95 },
    { name: "Brooding Dragon", sales: 0, price: 6350 },
    { name: "Ingenious Tadpole", sales: 39450, price: 0.35 },
    { name: "Optimistic Snail", sales: 420, price: 1.50 }
    ];
    var GridModel = function (items) {
    this.items = ko.observableArray(items);
    };
    ko.applyBindings(new GridModel(initialData));
    $('#jqxGrid').jqxGrid({ renderstatusbar: function(statusbar)
    {
    var container = $('<div ></div>');
    var addButton = $('<div ><span >Add</span></div>');
    container.append(addButton);
    statusbar.append(container);
    }});
    });
    </script>
    </head>
    <body class='default'>
    <div id='jqxWidget'>
    <div id="jqxGrid" data-bind="jqxGrid:
    {
    source: items,
    autoheight: true,
    showstatusbar: true,
    columns: [
    { text: 'Name', dataField: 'name', width: 200 },
    { text: 'Sales', dataField: 'sales', width: 200, cellsalign: 'right' },
    { text: 'Price', dataField: 'price', width: 200, cellsformat: 'c2', cellsalign: 'right' }
    ]}">
    </div>
    </div>
    </body>
    </html>

    but it is not working either.

    in reply to: Cell – row selection Cell – row selection #18463

    Makla
    Participant

    I know this. My question is can I manually do it? Set cell selection but set background colour of selected row to something.


    Makla
    Participant

    No, I don’t want to disable it. The problem is that I can not scroll without also resizing.
    Link to screen shot.


    Makla
    Participant

    Understand. Maybe it would be a good think to add in documentation ” in the column starting from 1.”
    Thank you.


    Makla
    Participant

    I almost think that this solved my problem. But it didn’t. Anyway, thanks for that.

    Just copy the code and try entering something inside textbox and then click button. If everything is OK, remove text from textbox and click the button again. Repeat the steps. Eventually the input text will not matched the allerted text.

    in reply to: Test Topic Test Topic #18008

    Makla
    Participant

    Understand. What if I prohibit (if this is possible) to enter own data. Will then be cleared?
    I only now discovered that anything can be typed in. The user must enter something from listbox (listbox shows data from table and I need ID).

    Edited: I think I found solution: DropDownList. 🙂

    in reply to: Knockout Knockout #17237

    Makla
    Participant

    Thanks.


    Makla
    Participant

    Yes, but it should.


    Makla
    Participant

    I know. I am saying that it should.

Viewing 15 posts - 31 through 45 (of 47 total)