Пример #1
0
        private void OnDetailCellCreating(object sender, GridDetailCellCreatingEventArgs e)
        {
            var customer        = e.Row.DataItem as Customer;
            var detailsView     = LayoutInflater.Inflate(Resource.Layout.RowDetailsCell, null);
            var countryLabel    = detailsView.FindViewById <Android.Widget.TextView>(Resource.Id.CountryLabel);
            var cityLabel       = detailsView.FindViewById <Android.Widget.TextView>(Resource.Id.CityLabel);
            var addressLabel    = detailsView.FindViewById <Android.Widget.TextView>(Resource.Id.AddressLabel);
            var postalCodeLabel = detailsView.FindViewById <Android.Widget.TextView>(Resource.Id.PostalCodeLabel);

            countryLabel.Text    = string.Format(Resources.GetString(Resource.String.RowDetailsCountry), customer.Country);
            cityLabel.Text       = string.Format(Resources.GetString(Resource.String.RowDetailsCity), customer.City);
            addressLabel.Text    = string.Format(Resources.GetString(Resource.String.RowDetailsAddress), customer.Address);
            postalCodeLabel.Text = string.Format(Resources.GetString(Resource.String.RowDetailsPostalCode), customer.PostalCode);
            e.Content            = detailsView;
        }
Пример #2
0
        private void OnDetailCellCreating(object sender, GridDetailCellCreatingEventArgs e)
        {
            var customer = e.Row.DataItem as Customer;

            e.Content = new DetailView(customer);
        }