jQuery UI Widgets Forums Grid grid custom cell rendering problem

This topic contains 2 replies, has 2 voices, and was last updated by  alex.tertishnik 9 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • grid custom cell rendering problem #65762

    alex.tertishnik
    Participant

    Hello, i try to make one column of my grid to be the ‘taginput’ like Here (i use example №4).
    Also i want to make last column a button, by clicking on that button the row will be deleted.
    the code for deleteing:
    column defenition:
    { text: 'Delete', datafield: 'Deleted', cellsalign: 'right', width: '9%', sortable: false, menu: false, cellsrenderer: deleteRender },
    my rendering and deleting functions:

    var deleteRender = function (id) {
        return '<input role="deleteUser" type="button" onClick="buttonclick(this)" class="btn btn-default" id="rowBtn' + id + '" value="Delete User"/>'
    }
    function buttonclick(e) {
        var selectedrowindex = $(gridSelector).jqxGrid('getselectedrowindex');
        var rowscount = $(gridSelector).jqxGrid('getdatainformation').rowscount;
        if (selectedrowindex >= 0 && selectedrowindex < rowscount) {
            var id = $(gridSelector).jqxGrid('getrowid', selectedrowindex);
            $(gridSelector).jqxGrid('deleterow', id);
        }
    
    }

    but if i set selectionmode to none the delete button doesent work
    but if i set selectionmode to singlerow my grid is repainted everytime i navigate throught table with my keyboard.
    and all data and my rendering for ‘tags input’ is destroyed.

    grid custom cell rendering problem #65770

    Peter Stoev
    Keymaster

    Hi alex.tertishnik,

    For displaying buttons in Grid cells, check this out: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/popupediting.htm?arctic. The demo also shows how to handle the button clicks.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    grid custom cell rendering problem #65780

    alex.tertishnik
    Participant

    i tried to add a button like in demo but it doesn’t work.
    what exact widgets i need to use it?
    i use these:

    
    jqxcore.js",
    jqxbuttons.js",
    jqxscrollbar.js",
    jqxlistbox.js",
    jqxdropdownlist.js",
    jqxdatetimeinput.js",
    jqxcalendar.js",
    jqxmenu.js",
    jqxdata.js",
    jqxgrid.js",
    jqxgrid.columnsreorder.js"
    jqxgrid.filter.js",
    jqxgrid.grouping.js",
    jqxgrid.pager.js",
    jqxgrid.sort.js",
    jqxgrid.selection.js",
    jqxgrid.columnsresize.js",
    jqxinput.js"
    
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.