jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 61 through 75 (of 116 total)
  • Author
    Posts

  • realtek
    Participant

    Hi Sorry,

    In my case this didn’t actually resolve the issue, I thought it did but it came back.

    I have now located the issue and it seems to be SQL performance issues.

    The data was taking too long to be returned from the server. I have resolved it and its working fine again now.

    Thank you


    realtek
    Participant

    Hi,

    Thats perfect thank you!

    I did think it might of been the page options but not enough to try removing them!

    Thank you!

    in reply to: POST not sending JSON! POST not sending JSON! #49710

    realtek
    Participant

    I have finally sorted this, I just needed to put JSON.stringify around the return like:

    return JSON.stringify(data);

    and remove the data parameter from the source.

    in reply to: WebAPI? WebAPI? #49415

    realtek
    Participant

    Hi,

    I have just got this working. I’m very impressed with the performance of using Web API with jqwidgets as apposed to web services/WCF.

    Very quick if I compare results.

    Thanks

    in reply to: Storing other data again item Storing other data again item #48642

    realtek
    Participant

    Hi Dimitar,

    This works perfectly thanks.

    Is it possible to then store this against the actual treeItem or can this only be obtained from the dataAdapter each time?

    Thanks


    realtek
    Participant

    ok, after days of looking at this I have found the solution right in the documentation!

    I just needed to use ‘formatData’ function instead of ‘data’

    in reply to: jqxGrid not binding to JSON jqxGrid not binding to JSON #31723

    realtek
    Participant

    Hi,

    OK, I have FINALLY managed to sort it…

    From this post here: http://blogs.msdn.com/b/carlosfigueira/archive/2008/04/17/wcf-raw-programming-model-web.aspx

    Firstly I moved this to a WCF service so its a bit more up to date and handles some things better.

    Secondly, I had simular issues… and this is what resolved it for me.

    Although the web service returned what appeard to be JSON, the fact it had “string etc…” wrapped around it meant it was actually returning a XML string with JSON in it.

    The only way I could resolve this was to return a Stream, not string.

    So use a StreamReadeer like:

    byte[] resultBytes = Encoding.UTF8.GetBytes(jsonResult);
    return new MemoryStream(resultBytes);

    and return this to the client. Its working for me now anyway. Thanks for your help though, you got me thinking with the message formats!

    in reply to: jqxGrid not binding to JSON jqxGrid not binding to JSON #31721

    realtek
    Participant

    Hi dperry,

    Yes they are identical except the first part says “string xmlns…. etc…”

    I have this set: [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]

    It looks like the identically same JSON format so I really don’t understand it. Chrome Developer Tools doesn’t give me any errors or more information.

    Yes it was a typo when I created the asmx and I haven’t got round to changing it yet – so it is correct for the time being! 🙂

    in reply to: Storing other data again item Storing other data again item #31540

    realtek
    Participant

    Hi Dimitar,

    Is this possible? I need to get this working for 2x ComboBox’s now.

    Thanks


    realtek
    Participant

    Brilliant thank you Dimitar 🙂 I didn’t realise you could remove an event handler like that.

    Perfect, thank you it resolved my issue

    in reply to: Storing other data again item Storing other data again item #31491

    realtek
    Participant

    Hi Dimitar,

    Is it possible to use the same logic for a jqxListbox that is bound to a datasource?

    So for example:

    $('#listBox').on("bindingComplete", function () {
    $('#listBox').on('checkChange', function (event) {
    var args = event.args;
    var checked = args.checked;
    if (checked) {
    var item = $('#listBox').jqxListBox('getItem', args.item.index);
    datatype = dataAdapter.records[item.id - 1].FieldType;
    }
    });
    });
         var url = "json/admin/Fields.php";
    // prepare the data
    var source =
    {
    data : {
    NUMBER : "18"
    },
    datatype: "json",
    datafields: [
    { name: 'DisplayName' },
    { name: 'Sequence' },
    { name: 'FieldType' }
    ],
    id: 'id',
    url: url,
    type: "POST",
    async: false
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    // Create a jqxListBox
    $("#listBox").jqxListBox({source: dataAdapter, checkboxes: true, allowDrag: false, enableSelection : true, equalItemsWidth:true, displayMember: "DisplayName", valueMember: "Sequence", width: '150', height: 300, theme: theme});

    I’m sure this isn’t correct as I keep getting an undefined error: Uncaught TypeError: Cannot read property ‘FieldType’ of undefined

    Obviously there is no getRecordsHierarchy but i don’t want to have a Hierarchy on these which isn’t possible on a listBox anyway.

    Thanks


    realtek
    Participant

    Basically I want the code to fire but almost ‘replace’ the current onClick event, not add a second one 🙂

    in reply to: Select Tree item by 'value' ? Select Tree item by 'value' ? #31443

    realtek
    Participant

    Hi Dimitar,

    Thank you for this.

    I literally just worked out a solution and wondered if your solution was a better idea….

    This is what I used:

    $(“#jqxTree”).on(‘initialized’, function (event) {
    $(“#jqxTree”).jqxTree(‘checkItem’, $(‘li:contains(“TEST”)’)[1], true);
    });

    I know it will ALWAYS be a child that needs selecting and if I need it to be the parent I will use [0].

    It seems to work ok and wondered what you thought?

    My only issue is doing it like this does not trigger the “checkChange” event ? Any idea’s? Thanks!

    in reply to: hasThreeStates not working hasThreeStates not working #31345

    realtek
    Participant

    Sorry, please ignore this… I have sorted it…


    realtek
    Participant

    There are some small issues that need ironing out such as the “pagesizeoptions” and the fact the browser could be resized but i’ll work on it.

    it would be good if this was supported out of the box because it seems quite logical and i’m sure many situations would benefit from it.

Viewing 15 posts - 61 through 75 (of 116 total)