jQWidgets Forums

jQuery UI Widgets Forums Grid Adding Add,Del, and Mod buttons

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Adding Add,Del, and Mod buttons #4272

    DavidSimmons
    Participant

    Is there a way to add Add, Del, and Mod buttons to the paging row or info bar?

    Adding Add,Del, and Mod buttons #4275

    Peter Stoev
    Keymaster

    Hi David,

    You can add any HTML element to the Pager’s element by selecting the pager’s element and using the jQuery’s append method.

    The example code below adds a jqxButton to the Pager’s element and also binds to the button’s click event.

    $("#jqxgrid").jqxGrid(
    {
    source: source,
    pageable: true,
    autoheight: true,
    ready: function () {
    var button = $("<input type='button' value='Button' id='myButton'/>");
    button.jqxButton({ height: 20 });
    button.click(function () {
    alert('click');
    });
    $(".jqx-grid-pager > div:first").append(button);
    },
    columns: [
    { text: 'Ship Name', datafield: 'ShipName', width: 250 },
    { text: 'Shipped Date', datafield: 'ShippedDate', width: 230, cellsformat: 'D' },
    { text: 'Freight', datafield: 'Freight', width: 130, cellsformat: 'F2', cellsalign: 'right' },
    { text: 'Ship Address', datafield: 'ShipAddress', width: 350 },
    { text: 'Ship City', datafield: 'ShipCity', width: 100 },
    { text: 'Ship Country', datafield: 'ShipCountry', width: 101 }
    ]
    });

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.