Implementing a custom editable cell for a ShinobiDataGrid with Xamarin


#1

Has anyone had any luck implementing a custom editable cell in a data grid when using Xamarin?  I found the example for Objective C here: http://www.shinobicontrols.com/blog/posts/2014/01/28/building-your-own-editable-data-grid-cells and usually I am able to follow along pretty well for those tutorials, but this time I am having problems with getting my custom SDataGridCell to call respondToEditEvent.  Does anyone have advice on this?


#2

Hi Canderson,

I think I may have responded to you directly via email but I’ll add the response here for the benefit of our other Grids Xamarin users.  :grin:

It seems like we’ve not exposed these bindings on the SDataGridCell class - I’ve put a task in our backlog to update this for our next release. Until then, you can bind these methods yourself in your subclass.

class MyClass : SDataGridCell {

    ....

    [Export ("respondToSelectionEvent")]
    public void RespondToSelectionEvent() {
        // Do something
    }
}

Jan


#3

Thanks, the selection event is working for me with that now.  For completion sake, here is the sibling method for edit events:

[Export(“respondToEditEvent”)]
public void RespondToEditEvent(){
            //Do something else
}


#4

Thanks for adding that!

Jan