Replies
I will attach some code with my next reply.
Few of my requirement are listed below so that I can give you a better understanding of what I want:
a) A grid which is editable (can I have one in which each row is editable(user dont need to double click to get into edit mode) without Done and cancel button.)
b) And each element when value or text changed should be validated from database.Can I specifically bind an error message against a cell.JQuery is an option but just want to confirm without that. Validation option is not working as expected at my end. Required feature works fine.
c) And also regarding Row selectors End Edit and Start Edit is taking time to execute so if user selects any row complete grid row cells gets a selector and checkbox.
Also I am facing one more issue…even when my Done button is there .. When a row clicked for edit all the dropdowns are getting set to the first index value.
e.g. if in my Row I have a drop down with options "Red","blue","Black".
I selected black and Saved it. Again I double click on the row to edit The value in drop down is getting set to "Red"- The first value.
Is there any settings in editor options which I am missing??
Hi Stamen,
Thanks for all your help.
I already tried : $(grid).igGridUpdating("endEdit", true, true);
but getting error that $rootscope.$apply() is already in progress.
AutoCommit is also true
Also can I have Row and cell selection together
Row Selectors are also not working with Updating feature
Below is my code:
var grid = $scope.GetGridName();
if ($(grid).igGridUpdating("isEditing") == true)
$(grid).igGridUpdating("endEdit", true); //Query 1: how can i fire RowEditEnded and all the the events getting fired at Done Button.
//I am performing save to database operation on RowEditEnded but without Done how can I make it work.
Also below is my delete code
$scope.DeleteRow = function () {
var grid = $scope.GetGridName();
if ($(grid).igGridUpdating("isEditing") == true)
$(grid).igGridUpdating("endEdit", true);
if ($scope.Errors != 0)
return alert('Invalid Line Item. Please Validate')
var row = $(grid).igGridSelection("selectedRow");
var data = $(grid).data('igGrid').dataSource.dataView()[row.index]; //Query 2 : Even though (endEdit, true) is used dataView is not updated
$(grid).igGridUpdating("deleteRow", row.id); //Query 3: row.id is getting passed correctly but getting error in updating.js at _editingForRowId
$(grid).igGrid("saveChanges");
$(grid).igGridSelection("selectRow", $(grid).igGrid('rows').length – 1);
}
HI,
The issue is
if my row is in edit mode and if showDoneCancelButtons = false then
if we add a row using 'addRow' then the edited values are not getting retained in the row which in edit mode before the row was added.
I need the updated values to be retained once I add a new row or perform any other operation in Grid