jQuery UI Widgets › Forums › Grid › grid custom cell rendering problem
Tagged: cellsrender, reload, repaint
This topic contains 2 replies, has 2 voices, and was last updated by alex.tertishnik 8 years, 10 months ago.
-
Author
-
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.- This topic was modified 8 years, 10 months ago by alex.tertishnik.
- This topic was modified 8 years, 10 months ago by alex.tertishnik.
- This topic was modified 8 years, 10 months ago by alex.tertishnik.
- This topic was modified 8 years, 10 months ago by alex.tertishnik.
- This topic was modified 8 years, 10 months ago by alex.tertishnik.
- This topic was modified 8 years, 10 months ago by alex.tertishnik.
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 StoevjQWidgets Team
http://www.jqwidgets.comi 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"
-
AuthorPosts
You must be logged in to reply to this topic.