jQWidgets Forums

jQuery UI Widgets Forums Grid jqxgrid update second grid source

This topic contains 2 replies, has 2 voices, and was last updated by  dan123 7 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • jqxgrid update second grid source #94890

    dan123
    Participant

    Hi i have two grid. First one has a customwidget column setup and it should perform rowselect or cellselect and update the source of the other grid. I am not sure how to this using customwidget. I would be glad if anyone can produce a solution that I am looking for and it would help greatly.

    Also I know how to the above using the columntype method like the one below.

    {
    text: ‘Edit’, datafield: ‘Edit’, columntype: ‘button’,
    cellsrenderer: function () {
    return “Edit”;
    },
    buttonclick: function (row) {
    $(‘#jqxgrid’).jqxGrid(‘clearselection’);
    $(‘#jqxgrid’).jqxGrid(‘selectrow’, row);
    }
    },

    But I want try doing rowselect/cellselect with using the customwidget like the one below:

    {
    text: ‘Picture’, datafield: ‘firstname’, width: 100,
    createwidget: function (row, column, value, htmlElement) {
    var datarecord = value;
    var button = $(“<div style=’margin: 6px 0px 0px 15px;’>” + value + “</div>”);
    $(htmlElement).append(button);
    button.jqxButton({ height: ‘50%’, width: ‘60%’ });
    button.click(function (event) {
    var clickedButton = button.find(“.buttonValue”)[0].innerHTML;
    alert(clickedButton);
    });
    },
    initwidget: function (row, column, value, htmlElement) {
    $(htmlElement).find(‘.buttonValue’)[0].innerHTML = value;
    }
    },

    Here is my jsiddle:
    https://jsfiddle.net/t69cdhbe/1/

    jqxgrid update second grid source #94894

    Stanislav
    Participant

    Hello Dan,

    The easier way of doing this is described on our website, in the Master-Details section. An Example, in which the first column is un-editable and clicking it will send data to the secound grid.

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

    jqxgrid update second grid source #94902

    dan123
    Participant

    Sorry Stanislav, this is not what I mean. I can updated the source like that what I mean is when I click the button using the createwidget

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

You must be logged in to reply to this topic.