Prism Xamarin How to access my grid at runtime

60 Views Asked by At

I am developing with Prism library and Xamarin, I want to create a table which will be able to add new rows and fill the content in the new rows.

It seems there is no table control, and I made a test with Grid, I defined the Grid at xaml like below:

        <Grid x:Name="SourceGrid" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition/>
        </Grid.RowDefinitions>
    </Grid>

But, how can I access this Grid after my application lauch at runtime.

I want to add new row while runtime.

1

There are 1 best solutions below

3
Nick Kovalsky On

First google for such made controls, there are some available from the community. Second please kindly read about creating xamarin custom controls it will answer much.

For the direct answer:

You can access its SourceGrid.Children with methods like SourceGrid.Children.Add(view, col, row);