RefreshAsync() on SfTreeGrid throws an Error

Hi all,

I am getting an Object not set to an instance of an object error when I am invoking the RefreshAsync() on SfTreeGrid object.

What could be the issue?


<SfButton OnClick="Refresh" Content="Refresh data"></SfButton>

<SfTreeGrid @ref="sfTreeGrid">

   Some fields here

</SfTreeGrid>


@code {

SfTreeGrid<DataObject> sfTreeGrid = new SfTreeGrid<DataObject>();


private async Task Refresh() 
{

 await this.sfTreeGrid.RefreshAsync();   <---- here gets the error thrown.

}




1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team April 13, 2022 03:41 PM UTC

Hi John,


Query#:- I am getting an Object not set to an instance of an object error when I am invoking the RefreshAsync() on SfTreeGrid object.


We have prepared sample using your provided code with our latest version(20.1.0.47) but we are unable to replicate the problem at our end. Refer to the sample Link:-

https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorApp1_(3)-1843525885.zip


The reported problem has been fixed in our latest version (from 19.4.56 versions). So we suggest to upgrade to our latest version in order to resolve the problem. Still faced issue with latest version, please get back to us with further details.


Regards,

Farveen sulthana T


Loader.
Up arrow icon