Can I preserve editing state in ag-grid when updating other rows - ag-grid

I'm trying to create an ag-grid where I may be receiving changes while editing a row. I've found that I can use api.applyTransaction to append new rows as long at they are below the row I am editing, but if I add rows ABOVE my row, the onCellEditingStopped handler always fires (though I'm not which of the possible reasons for cell editing stopping is the cause).

Related

Cell event in Nattable

I am new to Nebula Nat table, I have successfully created nattable in my application.
i have several columns one among them, one among them has a combo in it. i want to trigger a listener when ever there is change in the value of the cell . for example if i my combo box has value A and B. if change the value to A to B. i want to trigger a event and based on that event i want to change the value in the another cell.
I tired some of the listener nothing is comfortable, is there any listener in Nattable specific to cell. Because what ever the listener we have all specific nat table as a whole.
I analyzed more i found out that i can do capture selection in the cell using CellSelectionEvent. But what i need is to trigger whenever there is a change in the cell. but CellSelectionEvent triggers at the time of selection. Is there event i can use whenever there is a change in the cell.
With NatTable 1.6 the DataUpdateEvent was introduced for this.

DataTable: hide and not remove rows

When I use DataTable in client-side mode (on an existing table), only the displayed rows are inserted in the DOM (I use the paginator). This is annoying as my table displays a form, so the hidden rows aren't sent when I submit the form.
Is it possible to only hide the rows and not remove them from DOM ?
I didn't test it yet but the documentation says there is an API, from which we can get the whole form content and even modify the form - even rows that aren't displayed - so that answers my question.

Multiple rows insert auto insert in edit mode with UITextFields, similar to contacts phone/email

I am trying to recreate functionality of similar to adding/editing phone numbers or emails in the contact editing on the iPhone.
I always have an empty row with placeholder text available. In edit mode (push of a button on toolbar) I un-hide UITextField. In 'editing changed' callback I insert a new row into the section, again similar to iPhone contact editing view.
However, after the insert when I start modifying 2nd row (3rd row is inserted as expected) the value of the 1st row text field is cleared to the placeholder value.
I have read somewhere that I would need to store the text field value in row 1, at the time of 2nd row insertion, and on end editing (I assume) otherwise it would be lost? This seems quite strange to me and I was wondering if this is the only way? At what point would I go back to restore it? This of course keeps repeating as I insert a new row and modify the last row's value values in all the rows prior are being cleared.
Can anyone point me to an example of similar to contact editing functionality? If I would change the way rows are inserted by having the last row always be a "+ Add Value" row, would that help? I would not think so.
Also, It would be nice if I could change style of the 1st row from UITableViewCellEditingStyleNone to UITableViewCellEditingStyleDelete, but no matter what i have attempted including toggling editing NO/YES in the middle setting all visible rows to react to ignore transitions I can not get it to work, to have all but last row with UITableViewCellEditingStyleDelete. So I thought ok fine let me have the initial row not able to delete (not what I wanted, but I can live with it).
Please confirm, but I am guessing from reading farther that scrolling rows out of view would result in the same problem, so on textFieldDidEndEditing as well as possibly on each insert in my case, needs to be handled to store "new" data in the corresponding entry of the Data storage array for each row.
However, in my case without scroll I would probably need to do:
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimat....
for all rows in the section being modified and possibly all visible rows. Confirmation are greatly appreciated.
Why reuse at all in your case?
If all the rows are on the screen at all times just create a new UITableViewCell for each.
UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease];
configure content to go on it...
[cell.contentView addSubview:WHATEVER_YOU_CREATED];
[cell.contentView sizeToFit];
return cell;
Reusing cells is a way for those that have many rows to reuse the ones no longer visible to conserve resources.

Extjs form submitting multiple times

I'm using a form for edit some records. Each time When Edit link is clicked i'm loading one record data into form, changing the values and updating, its worked fine for the first time.
When i load another record data into form and update it, the present record is updating and the previous record is also updating with the new data.
If i update 3 rows after that when updated the 4th row, 4th row and previous 3 are updating with new data entered for 4th row.
I think form is submitting multiple times,
I used form reset property each time loading the values, but its not worked.
How to do this Please help me
Are you holding your formpanel into a Ext.Window component ? Check if the window is actually closed or hidden. Try putting closeAction: 'close' in your window config.

Selection reset issue when scrolling a UITableView

I have 15 rows in my table. When I select the first row and scroll to last row of the table, and come to back to the first row, my selection is reset. How can I fix this row selection reset issue when scrolling the table?
How are you selecting the row? Because of the table-cell reuse mechanism, just setting the selected property on an individual cell usually won't work; calling -selectRowsAtIndexPaths:animated: on the table view itself is the correct way to set its selection.