jQWidgets Forums
jQuery UI Widgets › Forums › Grid › column with button don't refresh the buttons
This topic contains 1 reply, has 1 voice, and was last updated by jperera 10 years ago.
-
Author
-
Good morning guys,
I have a grid with the following columns:text: '', datafield: 'SigForm', width: 70, cellclassname: 'centerButton', cellsrenderer: function (row, column, value) { var data = $('#gvHistory').jqxGrid('getrowdata', row); var html = ''; if (value == "SureView") { html += '<input id="btViewSureVideo" type="button" style="vertical-align:middle" value="" onclick="ShowOptionGrid(' + row + ')" class="buttonViewVideo"/>'; } if (data.SignalCode == "AV") { html += '<input id="btViewVideoFied" type="button" value="" style="vertical-align:middle" onclick="ShowOptionGridVideoFied(' + row + ')" class="buttonViewVideo"/>'; } if (data.MapURL != null) { html += '<input id="btViewMap" type="button" value="" style="vertical-align:middle" onclick="ShowMapOptionGrid(' + row + ')" class="buttonViewMap"/>'; } if (data.URLTarget != null) { html += '<input id="btViewUrlMap" type="button" value="" style="vertical-align:middle" onclick="ShowUrlOptionGrid(' + row + ')" class="buttonViewUrl"/>'; } if (data.FullClearFlag == true) { currectAlarm = data.AlarmNumOrTest; isFulClear = true; } if (data.AlarmFlag == true && isFulClear == false) { debugger; html += '<input id="btReqCancel" type="button" value="" style="vertical-align:middle" onclick="RequestCancelAlarm(' + row + ')" class="buttonReqCancel"/>'; } return html; } },
I have a method Refresh that i’m calling assigning the dataadapter to the grid:
$("#refreshHistory").on('click', function () { var dataAdapter = UpdateHistoryAccountGrid(); $("#gvHistory").jqxGrid({ source: dataAdapter }); });
The problem is that when i refresh the buttons in the column must be visualize in dependency of the data that i pull and the grid don’t refresh the buttons column. The data is refreshing correctly but the buttons don’t show up. When i refresh with F5 all the application then the grid load the button.
Any idea on how can i solve this issue.
Thanks in advanced.Hello everyone,
I found that the problem was mine with the variables that i’m using to do the methods for show the buttons.
Everything work fine with the grid.Thank you all.
-
AuthorPosts
You must be logged in to reply to this topic.