jQWidgets Forums
Forum Replies Created
-
Author
-
March 23, 2016 at 3:15 pm in reply to: How to get row data from the createwidget column's callback function? How to get row data from the createwidget column's callback function? #82773
Hi Ivo,
There is access to the only one field per column in that demo:
columns: [ { text: 'Picture', datafield: 'firstname', width: 100, createwidget: function (row, column, value, htmlElement) { // 'value' is the value of the 'firstname' field
There is no means to access the whole row.
March 23, 2016 at 8:10 am in reply to: How to get row data from the createwidget column's callback function? How to get row data from the createwidget column's callback function? #82745Hi Ivo,
But what about two or three buttons (or some complex widget containing few more widgets, etc.)?
I have simplified my example to make my question cleaner. It’s not about how to create a button, which can handle click events, but how to get row data when creating custom widgets in jqxGrid cells (in my case there may be different widgets, or no widgets at all, depending on the value of the row).
Why there is no access to the row at widget creation time? Why ‘cellsrenderer’ has this parameter and ‘createwidget’ has not?March 22, 2016 at 6:30 am in reply to: How to get row data from the createwidget column's callback function? How to get row data from the createwidget column's callback function? #82705Maybe there is another function which I can use to create a widget with access to row data? It is very bad that I can’t create even a simple jqxButton in such a way.
Your ‘cellsrenderer’ function doesn’t allow that because it expects a raw markup to be returned.March 21, 2016 at 8:38 am in reply to: How to get row data from the createwidget column's callback function? How to get row data from the createwidget column's callback function? #82658Hi Ivo,
Your solution doesn’t work. You have used ‘row.boundindex’ in your example, but this value is duplicated for different rows. So it shows wrong data.
Try to click ‘Show data’ in your example on some row which index is 17 for example:
https://www.jseditor.io/?key=createwidget-button-callback -
AuthorPosts