How to specify a context to BlazorBootstrap GridColum?

43 Views Asked by At

Error RZ9999: The child content element 'ChildContent' of component 'GridColumn' uses the same parameter name ('context') as enclosing child content element 'ChildContent' of component 'AuthorizeView'.

<AuthorizeView> <Grid @ref="GridB2bSupportSuiviMessage" TItem="B2bSupportSuiviMessage" Data="@v_Suivi.B2bSupportSuiviMessages" class="table table-hover table-bordered table-striped"> <GridColumn TItem="B2bSupportSuiviMessage" HeaderText="Id" PropertyName="Id">@context.Id</GridColumn> <GridColumn TItem="B2bSupportSuiviMessage" HeaderText="Date" PropertyName="DateMessage">@context.DateMessage</GridColumn> </Grid> </AuthorizeView>

I try to get many grids. But actually, 'AuthorizeView' use the same name 'context' as the 'GridColumn' from the BlazorBootstrap Framework.

1

There are 1 best solutions below

0
Martin VU On

I figure it out. I change the context name from the AuthorizeView:

<AuthorizeView Context="authorizeContext">
@authorizeContent.User.Name 
<Grid @ref="GridB2bSupportSuiviMessage" TItem="B2bSupportSuiviMessage" Data="@v_Suivi.B2bSupportSuiviMessages" class="table table-hover table-bordered table-striped"> 
<GridColumn TItem="B2bSupportSuiviMessage" HeaderText="Id" PropertyName="Id">@context.Id</GridColumn> 
<GridColumn TItem="B2bSupportSuiviMessage" HeaderText="Date" PropertyName="DateMessage">@context.DateMessage</GridColumn> 
</Grid> 
</AuthorizeView>

Hope that can help.