jQuery UI Widgets › Forums › Grid › Link Image / Icon Glyphicon instead button
This topic contains 11 replies, has 2 voices, and was last updated by Martin 5 years, 8 months ago.
-
Author
-
Hi,
I use a Grid with edit button (popup editing). I want to replace button with linked image or icon glyphicon. Icon or image must open a popup editing. Secondly I want put second icon in one column near Edit, which it’s a delete row. So I want has one column action with two linked icons. First to edit (popup editint) and second to delete row.Can you help me?
Hello dzimen,
Is it This what you are trying to achieve?
Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/It’s fine but when i click “icon plus” not open a popup editing: https://pastebin.com/n8Lftbnc
And How i can add action delete row to “delete icon”?Hello dzimen,
Please, look at the following Example.
The buttons ‘click’ events are implemented in thecreatewidget
callback of the column.
I have implements the event for deleting the current row.
Analogically, you should add the logic from the pop-up window opening from the Example in your previous topic.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/I implemented in my code, but I see blank cell. This is my code: https://pastebin.com/6MXG5eSV
Please HelpHello dzimen,
Which cells are blank? The ones in the widget column?
Try implementinginitwidget
also:initwidget: function (row, column, value, cellElement) { // update the widget }
Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/Still the same. Look at the photo and the column “Action” : https://zapodaj.net/37785498760e1.png.html
It does not display anything. Is there to be some additional library for createwidget?Hello dzimen,
There are no additional libraries or files to import for createwidget.
Check if the path to the images is referring to the correct directory, where the files are.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/I copy your icon where is link to icon. Look my code: https://pastebin.com/6MXG5eSV
Hello dzimen,
We were not able to reproduce such behavior with empty cells.
When copying thecreatewidget
callback the icons are rendered fine.
If you can send us a jsFiddle example, like this one, where this could be seen, we will check what may be the issue.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/Sorry, I have oldest version JQwidgets. After update it’s work. But autorowheight causes expanding the row… And Edit didn’t work because show this: “Cannot read property ‘name’ of undefined. Other property too.
Hello dzimen,
This is because the
getrowdata
method that you are using on Edit button click expects a row id as parameter and you are passing it an object.
Instead, you can use the following:var dataRecord = row.bounddata;
.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.