AngularJs ui-grid onRowSelectionChanged is not updating variable value, always it has default value
up vote
1
down vote
favorite
it worked fine last time i check(two or three months ago) their is a variable called with the default boolean value false like below.
$scope.IsRowSelected = false;
And i should mention when the debugger runs on first time value set as true.
But it come to delete function then the value reads the default value. i cant understand how to handle this error.
code is below :
$scope.IsRowSelected = false;
$scope.gridOptions.onRegisterApi = function (gridApi)
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope, function (row)
//$scope.selectedEmpID = row.entity.id;
debugger;
$scope.selectedEntity = row.entity;
$scope.Check = true;
$scope.IsRowSelected = true;
//in here it shows IsRowSelected as true
);
$scope.DeleteEntity = function ()
debugger;
//when this funtion excecute the IsRowSelected = false
if ($scope.IsRowSelected == true)
var selectedRow = $scope.selectedEntity;
javascript angularjs angular-ui-grid ui-grid
add a comment |
up vote
1
down vote
favorite
it worked fine last time i check(two or three months ago) their is a variable called with the default boolean value false like below.
$scope.IsRowSelected = false;
And i should mention when the debugger runs on first time value set as true.
But it come to delete function then the value reads the default value. i cant understand how to handle this error.
code is below :
$scope.IsRowSelected = false;
$scope.gridOptions.onRegisterApi = function (gridApi)
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope, function (row)
//$scope.selectedEmpID = row.entity.id;
debugger;
$scope.selectedEntity = row.entity;
$scope.Check = true;
$scope.IsRowSelected = true;
//in here it shows IsRowSelected as true
);
$scope.DeleteEntity = function ()
debugger;
//when this funtion excecute the IsRowSelected = false
if ($scope.IsRowSelected == true)
var selectedRow = $scope.selectedEntity;
javascript angularjs angular-ui-grid ui-grid
try using $timeout(function() $scope.IsRowSelected = true; )
– Vikram Singh
Nov 9 at 5:27
still it's not working
– Tharindu Dissanayaka
Nov 9 at 5:41
i had check with backup and its working.Their are no any changes between two codes.Still i unable to find the issue
– Tharindu Dissanayaka
Nov 9 at 6:03
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
it worked fine last time i check(two or three months ago) their is a variable called with the default boolean value false like below.
$scope.IsRowSelected = false;
And i should mention when the debugger runs on first time value set as true.
But it come to delete function then the value reads the default value. i cant understand how to handle this error.
code is below :
$scope.IsRowSelected = false;
$scope.gridOptions.onRegisterApi = function (gridApi)
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope, function (row)
//$scope.selectedEmpID = row.entity.id;
debugger;
$scope.selectedEntity = row.entity;
$scope.Check = true;
$scope.IsRowSelected = true;
//in here it shows IsRowSelected as true
);
$scope.DeleteEntity = function ()
debugger;
//when this funtion excecute the IsRowSelected = false
if ($scope.IsRowSelected == true)
var selectedRow = $scope.selectedEntity;
javascript angularjs angular-ui-grid ui-grid
it worked fine last time i check(two or three months ago) their is a variable called with the default boolean value false like below.
$scope.IsRowSelected = false;
And i should mention when the debugger runs on first time value set as true.
But it come to delete function then the value reads the default value. i cant understand how to handle this error.
code is below :
$scope.IsRowSelected = false;
$scope.gridOptions.onRegisterApi = function (gridApi)
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope, function (row)
//$scope.selectedEmpID = row.entity.id;
debugger;
$scope.selectedEntity = row.entity;
$scope.Check = true;
$scope.IsRowSelected = true;
//in here it shows IsRowSelected as true
);
$scope.DeleteEntity = function ()
debugger;
//when this funtion excecute the IsRowSelected = false
if ($scope.IsRowSelected == true)
var selectedRow = $scope.selectedEntity;
$scope.IsRowSelected = false;
$scope.gridOptions.onRegisterApi = function (gridApi)
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope, function (row)
//$scope.selectedEmpID = row.entity.id;
debugger;
$scope.selectedEntity = row.entity;
$scope.Check = true;
$scope.IsRowSelected = true;
//in here it shows IsRowSelected as true
);
$scope.DeleteEntity = function ()
debugger;
//when this funtion excecute the IsRowSelected = false
if ($scope.IsRowSelected == true)
var selectedRow = $scope.selectedEntity;
$scope.IsRowSelected = false;
$scope.gridOptions.onRegisterApi = function (gridApi)
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope, function (row)
//$scope.selectedEmpID = row.entity.id;
debugger;
$scope.selectedEntity = row.entity;
$scope.Check = true;
$scope.IsRowSelected = true;
//in here it shows IsRowSelected as true
);
$scope.DeleteEntity = function ()
debugger;
//when this funtion excecute the IsRowSelected = false
if ($scope.IsRowSelected == true)
var selectedRow = $scope.selectedEntity;
javascript angularjs angular-ui-grid ui-grid
javascript angularjs angular-ui-grid ui-grid
edited Nov 9 at 8:10
Mark
2,6961722
2,6961722
asked Nov 9 at 5:15
Tharindu Dissanayaka
63
63
try using $timeout(function() $scope.IsRowSelected = true; )
– Vikram Singh
Nov 9 at 5:27
still it's not working
– Tharindu Dissanayaka
Nov 9 at 5:41
i had check with backup and its working.Their are no any changes between two codes.Still i unable to find the issue
– Tharindu Dissanayaka
Nov 9 at 6:03
add a comment |
try using $timeout(function() $scope.IsRowSelected = true; )
– Vikram Singh
Nov 9 at 5:27
still it's not working
– Tharindu Dissanayaka
Nov 9 at 5:41
i had check with backup and its working.Their are no any changes between two codes.Still i unable to find the issue
– Tharindu Dissanayaka
Nov 9 at 6:03
try using $timeout(function() $scope.IsRowSelected = true; )
– Vikram Singh
Nov 9 at 5:27
try using $timeout(function() $scope.IsRowSelected = true; )
– Vikram Singh
Nov 9 at 5:27
still it's not working
– Tharindu Dissanayaka
Nov 9 at 5:41
still it's not working
– Tharindu Dissanayaka
Nov 9 at 5:41
i had check with backup and its working.Their are no any changes between two codes.Still i unable to find the issue
– Tharindu Dissanayaka
Nov 9 at 6:03
i had check with backup and its working.Their are no any changes between two codes.Still i unable to find the issue
– Tharindu Dissanayaka
Nov 9 at 6:03
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
gridApi.selection.on.rowSelectionChanged function call when row is getting unselect, set noUnselect property to true,so row cant be unselected.
$scope.gridApi.selection.getSelectedRows();
use this code to get the selected row from the grid.
Working Fiddle
its not working.
– Tharindu Dissanayaka
Nov 9 at 8:26
jsfiddle.net/h5p4mbvL here is the working fiddle
– sridhar rajendran
Nov 9 at 9:54
thanks for your help.
– Tharindu Dissanayaka
Nov 9 at 10:14
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
gridApi.selection.on.rowSelectionChanged function call when row is getting unselect, set noUnselect property to true,so row cant be unselected.
$scope.gridApi.selection.getSelectedRows();
use this code to get the selected row from the grid.
Working Fiddle
its not working.
– Tharindu Dissanayaka
Nov 9 at 8:26
jsfiddle.net/h5p4mbvL here is the working fiddle
– sridhar rajendran
Nov 9 at 9:54
thanks for your help.
– Tharindu Dissanayaka
Nov 9 at 10:14
add a comment |
up vote
0
down vote
gridApi.selection.on.rowSelectionChanged function call when row is getting unselect, set noUnselect property to true,so row cant be unselected.
$scope.gridApi.selection.getSelectedRows();
use this code to get the selected row from the grid.
Working Fiddle
its not working.
– Tharindu Dissanayaka
Nov 9 at 8:26
jsfiddle.net/h5p4mbvL here is the working fiddle
– sridhar rajendran
Nov 9 at 9:54
thanks for your help.
– Tharindu Dissanayaka
Nov 9 at 10:14
add a comment |
up vote
0
down vote
up vote
0
down vote
gridApi.selection.on.rowSelectionChanged function call when row is getting unselect, set noUnselect property to true,so row cant be unselected.
$scope.gridApi.selection.getSelectedRows();
use this code to get the selected row from the grid.
Working Fiddle
gridApi.selection.on.rowSelectionChanged function call when row is getting unselect, set noUnselect property to true,so row cant be unselected.
$scope.gridApi.selection.getSelectedRows();
use this code to get the selected row from the grid.
Working Fiddle
edited Nov 9 at 9:55
answered Nov 9 at 6:27
sridhar rajendran
87
87
its not working.
– Tharindu Dissanayaka
Nov 9 at 8:26
jsfiddle.net/h5p4mbvL here is the working fiddle
– sridhar rajendran
Nov 9 at 9:54
thanks for your help.
– Tharindu Dissanayaka
Nov 9 at 10:14
add a comment |
its not working.
– Tharindu Dissanayaka
Nov 9 at 8:26
jsfiddle.net/h5p4mbvL here is the working fiddle
– sridhar rajendran
Nov 9 at 9:54
thanks for your help.
– Tharindu Dissanayaka
Nov 9 at 10:14
its not working.
– Tharindu Dissanayaka
Nov 9 at 8:26
its not working.
– Tharindu Dissanayaka
Nov 9 at 8:26
jsfiddle.net/h5p4mbvL here is the working fiddle
– sridhar rajendran
Nov 9 at 9:54
jsfiddle.net/h5p4mbvL here is the working fiddle
– sridhar rajendran
Nov 9 at 9:54
thanks for your help.
– Tharindu Dissanayaka
Nov 9 at 10:14
thanks for your help.
– Tharindu Dissanayaka
Nov 9 at 10:14
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53220231%2fangularjs-ui-grid-onrowselectionchanged-is-not-updating-variable-value-always-i%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
try using $timeout(function() $scope.IsRowSelected = true; )
– Vikram Singh
Nov 9 at 5:27
still it's not working
– Tharindu Dissanayaka
Nov 9 at 5:41
i had check with backup and its working.Their are no any changes between two codes.Still i unable to find the issue
– Tharindu Dissanayaka
Nov 9 at 6:03