# DataGrid LoadData not working in webassembly

**URL:** <https://forum.radzen.com/t/datagrid-loaddata-not-working-in-webassembly/4428>\
**Category:** Blazor Server\
**Created:** [July 28, 2020, 9:45am UTC](https://forum.radzen.com/t/datagrid-loaddata-not-working-in-webassembly/4428 "2020-07-28T09:45:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![luvssti](https://forum.radzen.com/user_avatar/forum.radzen.com/luvssti/32/3908_2.png) [@luvssti](https://forum.radzen.com/u/luvssti)\
**Post date:** [July 28, 2020, 9:45am UTC](https://forum.radzen.com/t/datagrid-loaddata-not-working-in-webassembly/4428/1 "2020-07-28T09:45:07Z")

</div>

Hi!

I just want to ask for help because I can't make the DataGrid work in my Webassembly project but my other project with Server side it is working fine.

I follow the guide in your website and included false

The issue is on the first load of the page LoadData is not triggered.

Thank you!

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [July 28, 2020, 10:58am UTC](https://forum.radzen.com/t/datagrid-loaddata-not-working-in-webassembly/4428/2 "2020-07-28T10:58:08Z")

</div>

Works normally on my end:

 ![image](https://forum.radzen.com/uploads/default/original/2X/a/a93aa1f7016e3e3bf06a9e713993bc274932a65c.png)  
 ![image](https://forum.radzen.com/uploads/default/original/2X/c/c472a5dc3c1ecfe36910e56e2a77dbc57ca414de.png)  
 ![image](https://forum.radzen.com/uploads/default/original/2X/8/8cdfd1ce1bf9d9b909618adfe00ce87754cbc72a.png)  
 ![image](https://forum.radzen.com/uploads/default/original/2X/7/7ed273e56b2ebd2fe98a80470805ad2271addd57.png)

---

<div class="post-metadata">

**Author:** ![luvssti](https://forum.radzen.com/user_avatar/forum.radzen.com/luvssti/32/3908_2.png) [@luvssti](https://forum.radzen.com/u/luvssti)\
**Post date:** [July 28, 2020, 11:41pm UTC](https://forum.radzen.com/t/datagrid-loaddata-not-working-in-webassembly/4428/3 "2020-07-28T23:41:51Z")

</div>

Hi Mr. enchev,

Good Day!

Thank You for the immediate response. I will try it in a new project and hope I succeed. I think there is no problem with it but it's not working. The LoadData is triggered only when you search/Filter.  
Below is my code.

```
<div class="row">
<div class="col-md-12">
    <RadzenGrid AllowFiltering="true" FilterCaseSensitivity="Radzen.FilterCaseSensitivity.CaseInsensitive" AllowPaging="true" PageSize="10" AllowSorting="true" Data="@applications" TItem="Application" ColumnWidth="200px" LoadData="@(args => GetData(args))" Count="@cnt">
        <Columns>
            <RadzenGridColumn TItem="Application" Property="AppID" Title="Application ID" />
            <RadzenGridColumn TItem="Application" Property="LName" Title="Last Name" />
            <RadzenGridColumn TItem="Application" Property="FName" Title="First Name" />
            <RadzenGridColumn TItem="Application" Property="MName" Title="Middle Name" />
            <RadzenGridColumn TItem="Application" Property="ExtName" Title="Ext. Name" />
            <RadzenGridColumn TItem="Application" Property="Address" Title="Address" />
            <RadzenGridColumn TItem="Application" Property="BrgyName" Title="Barangay" />
            <RadzenGridColumn TItem="Application" Property="TownName" Title="Town" />

        </Columns>
    </RadzenGrid>
</div>

```

@code {

```
HttpClient Http = new HttpClient();
List<Application> applications = new List<Application>();
ApplicantInspectionGrid applicantInspection = new ApplicantInspectionGrid();
int cnt = 0;    

async Task GetData(LoadDataArgs args)
{
    try
    {

        applicantInspection.Top = args.Top.ToString();
        applicantInspection.Skip = args.Skip.ToString();
        applicantInspection.OrderBy = args.OrderBy;
        applicantInspection.COAID = 114;

        var stringPayload = JsonConvert.SerializeObject(applicantInspection);
        var content = new StringContent(stringPayload, Encoding.UTF8, "application/json");
        var response = await Http.PostAsync("http://localhost:50197/api/Application/GetApplicantForInspection", content);
        var responseToString = await response.Content.ReadAsStringAsync();
        JObject obj = JObject.Parse(responseToString);
        applications = JsonConvert.DeserializeObject<List<Application>>(obj["Contents"].ToString());
        cnt = Convert.ToInt32(JsonConvert.DeserializeObject(obj["Count"][0]["TotalRows"].ToString()));
        //acctname = applications[0].AppName;

        StateHasChanged();
    }
    catch (Exception ex)
    {
        Console.Error.WriteLine(ex.Message);
    }
}

```

}

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [July 29, 2020, 4:58am UTC](https://forum.radzen.com/t/datagrid-loaddata-not-working-in-webassembly/4428/4 "2020-07-29T04:58:51Z")

</div>

> [@luvssti](#):
>
> `List<Application> applications`

Try to set null as initial value

---

<div class="post-metadata">

**Author:** ![luvssti](https://forum.radzen.com/user_avatar/forum.radzen.com/luvssti/32/3908_2.png) [@luvssti](https://forum.radzen.com/u/luvssti)\
**Post date:** [July 29, 2020, 6:32am UTC](https://forum.radzen.com/t/datagrid-loaddata-not-working-in-webassembly/4428/5 "2020-07-29T06:32:53Z")

</div>

Hi Mr. enchev,

It's working now. Thank you very much!
