This project has moved and is read-only. For the latest updates, please go here.

Xamarin Android binding to ExpandableListView items

Oct 13, 2015 at 7:36 PM

I would like to bind models that contains a bool to a Checkbox in an ExpandableListView items.
I try this without success (it crashes the app):
public override View GetChildView(int groupPosition, int childPosition, bool isLastChild, View convertView, ViewGroup parent)
            View row = convertView;
            if (row == null)
                row = Context.LayoutInflater.Inflate(Resource.Layout.ContractTemplate, null);
            var checkBox = row.FindViewById<CheckBox>(Resource.Id.ContractCheckBox);
                 () => _models[groupPosition].Contracts[childPosition].Downloaded,
                 () => checkBox.Checked);

            return row;
Thanks a lot for your help!
Oct 17, 2015 at 2:44 PM
That cannot work.

Use the GetAdapter extension method instead.

Oct 18, 2015 at 3:30 PM
Thanks Laurent,

How do you use the GetAdapter instead to resolve such thing ?

Thanks !