Hi - I'm having an issue when in Edit Mode with a column created dynamically. If I scroll the grid row out of view while it's in Edit Mode I'll get an exception. This is only when it is required to create my columns dynamically.
I've attached a link to a sample project to illustrate this issue. By Double Clicking the first cell, then scrolling down in the grid will cause an exception to an undefined key. I'm wondering how do I resolve this issue.
Many thanks in advance. I'll be sure to remove the sample project.
Thanks I got the sample. And will take a look now.
Can you please remove the download link.
In the future, if you delete the bin and obj folders before zipping up your project, it'll be a lot smaller, and you won't be distributing our controls.
Thanks,
-SteveZ
So, i thought i had exposed a method that would easily allow you to just override it and apply the value to your cell. Apparently i didn't :(
I'll definitely add that though.
Fortunately, the logic you'd have to reimplement is trivial. Jus add this method to your column and you should be good to go:
public override void RemoveEditor (IGGridView gridView, IGCellPath path, IGGridViewDataSourceHelper dataSource, bool cellVisible, bool anotherCellEnteringEditMode) { gridView.UnregisterKeyboard (!anotherCellEnteringEditMode); IGGridViewCell cell = (IGGridViewCell)gridView.ResolveCellForPath (path); UITextField field = (UITextField)cell.Subviews [0]; cSimpleGrid dataRow = (cSimpleGrid)dataSource.ResolveDataObjectForRow (path); dataRow [_fieldKey] = cell.TextLabel.Text = field.Text; float duration = cellVisible? dataSource.EditingTransitionDuration : 0.0f; UIView.Transition (field, cell.TextLabel, duration, UIViewAnimationOptions.TransitionFlipFromTop, null); }