Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Problem with Blazor and inherited classes

$
0
0

My base class Grid.razor:

<MudDataGrid @ref="_grid" ....@code {  MudDataGrid<T>? _grid = null;  protected override void OnInitialized()  {       _grid is not null all is ok.      SetData(1) in SetData _grid is not null  }  proteced async Task SetData(T data)  {     _grid is null ????  }}

If I now create a new class and derive it from the other one I have a problem.

@inherits Grid<MudButton OnClick=Test>Test</MudButton>@code {    private async Task Test()    {         SetData(1) here ist _grid null    }}

What do I have to do so that I can call the base class from the derived class and call methods of _grid?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>