Exemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var data = Customer.GetCustomerList(1000);

            Grid.AutoGenerateColumns = false;
            Grid.Columns.Add(new GridColumn()
            {
                Binding = "Id", Width = GridLength.Auto
            });
            Grid.Columns.Add(new GridColumn()
            {
                Binding = "FirstName", Width = GridLength.Star
            });
            Grid.Columns.Add(new GridColumn()
            {
                Binding = "LastName", Width = GridLength.Star
            });
            var details = new FlexGridDetailProvider();

            details.Attach(Grid);
            details.DetailCellCreating += OnDetailCellCreating;
            details.Height              = GridLength.Auto;
            Grid.ItemsSource            = data;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.GettingStarted);
            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            SupportActionBar.Title = GetString(Resource.String.RowDetailsTitle);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);

            var grid = FindViewById <FlexGrid>(Resource.Id.Grid);

            var data = Customer.GetCustomerList(100);

            grid.AutoGenerateColumns = false;
            grid.Columns.Add(new GridColumn()
            {
                Binding = "Id", Width = GridLength.Auto
            });
            grid.Columns.Add(new GridColumn()
            {
                Binding = "FirstName", Width = GridLength.Star
            });
            grid.Columns.Add(new GridColumn()
            {
                Binding = "LastName", Width = GridLength.Star
            });
            var details = new FlexGridDetailProvider();

            details.Attach(grid);
            details.DetailCellCreating += OnDetailCellCreating;
            details.Height              = GridLength.Auto;
            //details.DetailCollapsedIconTemplate = new C1IconTemplate(() => new C1BitmapIcon(BaseContext) { Source = BitmapFactory.DecodeResource(Resources, Resource.Drawable.arrow_up) });
            grid.HeadersVisibility = GridHeadersVisibility.All;
            grid.ItemsSource       = data;
        }
Exemplo n.º 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.GettingStarted);
            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            SupportActionBar.Title = GetString(Resource.String.RowDetailsTitle);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);

            var grid = FindViewById <FlexGrid>(Resource.Id.Grid);

            var data = Customer.GetCustomerList(100);

            grid.AutoGenerateColumns = false;
            grid.Columns.Add(new GridColumn()
            {
                Binding = "Id", Width = GridLength.Auto
            });
            grid.Columns.Add(new GridColumn()
            {
                Binding = "FirstName", Width = GridLength.Star
            });
            grid.Columns.Add(new GridColumn()
            {
                Binding = "LastName", Width = GridLength.Star
            });
            var details = new FlexGridDetailProvider();

            details.Attach(grid);
            details.DetailCellCreating += OnDetailCellCreating;
            details.Height              = GridLength.Auto;
            grid.ItemsSource            = data;
        }