jQWidgets Forums

jQuery UI Widgets Forums Grid Inline editing and knockout

This topic contains 16 replies, has 3 voices, and was last updated by  Peter Stoev 12 years, 11 months ago.

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
  • Inline editing and knockout #5092

    damc
    Participant

    Hi!

    I’m struggling with this problem for a couple of days now. Please help me solve this problem.

    If I change value in cell – for example in column test into “abc” then ‘updaterow’ function updates cell value into array of characters String { 0=”a”, 1=”b”, 2=”c”} instead of “abc”. Grid shows value as string “abc” – it’s OK. But if I write it in console or display JSON before post it to server it is an array of characters String { 0=”a”, 1=”b”, 2=”c”} . I watch on debug parameter ‘rowdata’ value and there is also for column test value an array of characters String { 0=”a”, 1=”b”, 2=”c”} .

    updaterow: function (row, rowdata) {
    var record = self.myData.arrayA()[row];
    for(var obj in record)
    {
    record[obj] = ko.observable(rowdata[obj]);
    }
    console.log(self.myData.arrayA()[row].text()); // String { 0=”a”, 1=”b”, 2=”c”}.
    }

    Thank you for your help.

    Inline editing and knockout #5093

    Peter Stoev
    Keymaster

    Unfortunately, I don’t know why KnockoutJS converts the passed string to an array. Hope that this topic will help you out: http://knockoutjs.com/documentation/observables.html

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic.