Hi.
I'm using a SfGrid component with a SfDataManager (UrlAdaptor) to bind remote data to the grid.
Is there an option to display the grid only after data being loaded?
Perfectly, I'm looking for solutions like:
@if (!DataBinded)
{
<Loader/>
}
else
{
<SfGrid TValue="NewsModel" AllowPaging="true">
<GridPageSettings PageSize="@SharedConstants.GridConstants.PageSize"></GridPageSettings>
<SfDataManager Url="@Url" Adaptor="Adaptors.UrlAdaptor"></SfDataManager>
<GridEvents TValue="NewsModel" DataBound="UpdateState"></GridEvents>
<GridColumns>
...
</GridColumns>
</SfGrid>
}
@code
{
public bool DataBinded { get; set; }
public void UpdateState()
{
DataBinded = true;
}
}
Looks like DataBound event does not trigger while the grid is not rendered because of if-else condition.
Thanks.