Hi,
I have a scroll event in 1 grid that applies the same offset to a second grid. All good, but once I added delegate to the first green I do not get events any more since they are going to delegate. What override in delegate i have to handle to accomplish the same functionality?
Thanks
Mark
Hi Mark,
Good question. In objective-c the IGGridViewDelegate derives from UIScrollViewDelegate. However, for some reason there is an issue with the Xamarin bindings where it doesn't recognize that by default.
You can still get it to work though:
First change your delegate implementation to:
public class GridViewDelegate : UIScrollViewDelegate, IIGGridViewDelegate
Then you just need to add your overrides for the gridView stuff again. When you do, they'll look something like:
[Export ("gridView:didSelectCellAtPath:")] public void DidSelectCell (Infragistics.IGGridView gridView, Infragistics.IGCellPath path)
And finally, use the weakDelegate property of the grid:
Grid.WeakDelegate = new GridViewDelegate(this);
The scrolled method is:
public override void Scrolled (UIScrollView scrollView) { }
-SteveZ
Steve,
Thank you
By doing that i can handle scroll now but UpdateRequested (part of GridView pull down event) is gone now.
What am I missing now?
Should look like this:
[Export ("updateRequestedInGridView:")] public void UpdateRequested (Infragistics.IGGridView gridView) { }
Coming back to you previous answer, so as a result I have a delegate for a grid that is inherited from UIScrollViewDelegate, IIGGridViewDelegate,
How do I override the following methods using c# in the same delegate?
public override bool ShouldShowMenuForCell(IGGridView gridView, IGCellPath path)
public override bool CanPerformActionForCell(IGGridView gridView, Selector action, IGCellPath path, NSObject sender)
public override void PerformActionForCell(IGGridView gridView, Selector action, IGCellPath path, NSObject sender)