Posted 1 November 2017, 7:09 pm EST
hello Deepak,
Please find the code sample i used for the row double click as follows.
var dataView;
function GetGridData() {
$scope.data=[
{ data1:value01,data2:value02},
{ data1:value11,data2:value12},
{ data1:value21,data2:value22},
{ data1:value31,data2:value32},
];
var columns=[
{}
];
dataView = new GC.Spread.Views.DataView(document.getElementById('grid1'), $scope.data, columns,
new GC.Spread.Views.Plugins.GridLayout(
{
allowSorting: false,
showColHeader: true,
showRowHeader: false,
allowResizing: true,
selectionMode: 'single',
loadOnDemand: true,
showToolPanel: false,
allowColumnReorder: true,
allowCellMerging: true
}));
dataView["rowDbClick"].addHandler(rowDbClickFun);
}
window.rowDbClickFun = function (sender, args) {
$mdDialog.show({
templateUrl: '/test.html',
controller: 'testCtrl',
disableParentScroll: true,
parent: angular.element(document.body),
targetEvent: sender,
multiple: true,
clickOutsideToClose: false,
fullscreen: $scope.customFullscreen,
resolve: {
postDataDetail: (function () {
return {
data1:value1,data2:value2
};
})
}
}).then(function () {
GetGridData();
//dataView.invalidate();
// location.reload();
});
}
in rowDbClickFun() popup opens.once the popup closed the ‘then’ function will took place.
the grid refreshed again. now i double click the row it get into rowDbClickFun() more than once max of 25 times.Help me to solve this issue.
if i use dataView.invalidate() same issue occured.
if i use location.reload() the total page gets reload.Here just i need to reload the grid.By getting data from api or reload the only $scope.data of the grid .
Thanks,
Arulventhan NP