I am using igGrid where my columns are creating dynamically on product selection(column data from database). Even the cell will have dropdown or text box that info is also dynamic as per user selection.
I want to have a grid which is editable (on edit mode must have textbox or combo box as per the data) and user doesnot have to click on Done button on each edit.
I tried achieving this by hiding Done container but when I programmatically add a new row then I need the new row to be editable without done but...and getting error : already a row is in edit mode
Hello,
Normally using public methods does not cause events to get raised but there are certain methods, usually those that are used with less information about the grid's state than the method produces, which may be configured to raise events. endEdit is one such method and to make it raise events you just need to specify its second parameter like this:
$(grid).igGridUpdating("endEdit", true, true);
As for your other questions, the data view will change when the edit is committed. By default all changes are stored in a transaction array (obtainable using pendingTransactions) and a manual commit call is required to propagate them to the underlying data source. Alternatively, you can enable autoCommit allowing the grid to commit any changes as they come. Finally, row and cell selection cannot be mixed together. Enabling Row Selectors requires that Selection is set to mode: 'row'. Do you receive any errors with Row Selectors and Updating if Selection is set to mode 'row'?
Best regards,
Stamen Stoychev
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); }
When using addRow the edit mode in progress should not end automatically in normal circumstances (do you have Paging enabled?) and showDoneCancelButtons doesn't directly affect whether changes are retained or not. If you are entering edit mode immediately for the added row, please try to end editing (with endEdit) for the previous one using 'true' as the first parameter telling Updating to save any changes done.
It will also be helpful if you could share some of the code you are using for these operations so I can better understand the application's flow and how Updating's API is called.
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