# New user - can't get Datagrid to show anything

**URL:** <https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459>\
**Category:** Radzen.Blazor Components\
**Created:** [October 28, 2020, 8:38pm UTC](https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459 "2020-10-28T20:38:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larry](https://forum.radzen.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@Larry](https://forum.radzen.com/u/Larry)\
**Post date:** [October 28, 2020, 8:38pm UTC](https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459/1 "2020-10-28T20:38:41Z")

</div>

I'm doing a trial of the Radzen datagrid and am using this example to get my some mocked up randomized data to populate a grid:

[https://blazor.radzen.com/datagrid-loaddata](https://blazor.radzen.com/datagrid-loaddata)

For the moment, instead of creating any kind of database connection and using a dbcontext I just rigged up randomized data which I'm able to verify is in the object I'm trying to use to populate the grid. When I run the test application, the grid is not showing up at all. I can't tell whether it's just not visible or there the data I generate isn't populating the grid. Here's a partial code snippet, I'm not including all of the columns/class properties. Can anyone tell me what I'm missing (I had to upload a screen shot of the RazdenGrid markup, it won't show up in this post)?

@code {

```
int count;

public IEnumerable<AgentSurveyReviewModel> Surveys { get; set; }

public class AgentSurveyReviewModel
{
    public string CallId { get; set; }
    public string AgentFirstName { get; set; }
    public string AgentLastName { get; set; }
}

```

public async Task LoadData(LoadDataArgs args)  
{  
Surveys = Enumerable.Range(1, 15).Select(x =\> new AgentSurveyReviewModel()  
{  
CallId = (10000 + x).ToString(),  
AgentFirstName = (new string { "Larry", "Simon", "Tom", "Bridgette", "Cherdell", "Denise", "Paul", "Steve" })  
[new Random().Next(8)],  
AgentLastName = (new string { "Munoz", "Reboul", "Meyer", "Kroll", "Singleton", "Finlan", "Koppe", "Gentile" })  
});  
Surveys = Surveys.Skip(args.Skip.Value).Take(args.Top.Value).ToList();

```
    count = Surveys.Count();

    await InvokeAsync(StateHasChanged);
}![Datagrid|690x71](upload://ajE0uX0DoPMAaRqUezprALZDAol.png)

```

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 29, 2020, 6:46am UTC](https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459/2 "2020-10-29T06:46:25Z")

</div>

Hi @Larry,

Your RadzenGrid configuration is missing and we can't help without it. The code you have provided doesn't include anything Radzen related. Also please format it according to our [guidelines](http://forum.radzen.com/faq).

---

<div class="post-metadata">

**Author:** ![Larry](https://forum.radzen.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@Larry](https://forum.radzen.com/u/Larry)\
**Post date:** [October 29, 2020, 3:41pm UTC](https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459/3 "2020-10-29T15:41:23Z")

</div>

See if this works:

```auto
<RadzenGrid Count="@count" Data="@Surveys" LoadData="@LoadData" TItem="AgentSurveyReviewModel" ColumnWidth="200px" Visible="true" AllowSorting="true"
            AllowFiltering="true" AllowPaging="true" PageSize="5">
<RadzenGridColumn TItem="AgentSurveyReviewModel" Property="CallId" Title="Call Id"></RadzenGridColumn>
    <RadzenGridColumn TItem="AgentSurveyReviewModel" Property="AgentFirstName" Title="Agent First Name"></RadzenGridColumn>
    <RadzenGridColumn TItem="AgentSurveyReviewModel" Property="AgentLastName" Title="Agent Last Name"></RadzenGridColumn>
</RadzenGrid>

```

---

<div class="post-metadata">

**Author:** ![Larry](https://forum.radzen.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@Larry](https://forum.radzen.com/u/Larry)\
**Post date:** [October 29, 2020, 4:01pm UTC](https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459/4 "2020-10-29T16:01:57Z")

</div>

This is the razor. Both the grid markup and the C# code have just 3 columns/fields to simplify:

`@code {

```
int count;

public IEnumerable<AgentSurveyReviewModel> Surveys { get; set; }

public class AgentSurveyReviewModel
{
    public string CallId { get; set; }
    public string AgentFirstName { get; set; }
    public string AgentLastName { get; set; }
}

public async Task LoadData(LoadDataArgs args)
{
    Surveys = Enumerable.Range(1, 15).Select(x => new AgentSurveyReviewModel()
    {
        CallId = (10000 + x).ToString(),
        AgentFirstName = (new string[] { "Larry", "Simon", "Tom", "Bridgette", "Cherdell", "Denise", "Paul", "Steve" })
        [new Random().Next(8)],
        AgentLastName = (new string[] { "Munoz", "Reboul", "Meyer", "Kroll", "Singleton", "Finlan", "Koppe", "Gentile" })
        [new Random().Next(8)]
    });

    Surveys = Surveys.Skip(args.Skip.Value).Take(args.Top.Value).ToList();

    count = Surveys.Count();

    await InvokeAsync(StateHasChanged);
}

```

}`

---

<div class="post-metadata">

**Author:** ![Larry](https://forum.radzen.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@Larry](https://forum.radzen.com/u/Larry)\
**Post date:** [October 29, 2020, 4:04pm UTC](https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459/5 "2020-10-29T16:04:47Z")

</div>

Also, if it helps, I was able to get a Radzen button to show up so I think I have the stuff from the quick-start guide in place correctly, I just can't get the grid to show up even though I've stepped through the code and I can see that the code that makes up randomized data is working.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 29, 2020, 4:06pm UTC](https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459/6 "2020-10-29T16:06:28Z")

</div>

Your declaration is missing the `<Columns>` element. Here is how it should look like:

```auto
<RadzenGrid Count="@count" Data="@Surveys" LoadData="@LoadData" TItem="AgentSurveyReviewModel" ColumnWidth="200px" Visible="true" AllowSorting="true"
            AllowFiltering="true" AllowPaging="true" PageSize="5">
    <Columns>
        <RadzenGridColumn TItem="AgentSurveyReviewModel" Property="CallId" Title="Call Id"></RadzenGridColumn>
        <RadzenGridColumn TItem="AgentSurveyReviewModel" Property="AgentFirstName" Title="Agent First Name"></RadzenGridColumn>
        <RadzenGridColumn TItem="AgentSurveyReviewModel" Property="AgentLastName" Title="Agent Last Name"></RadzenGridColumn>
    </Columns>
</RadzenGrid>

```

---

<div class="post-metadata">

**Author:** ![Larry](https://forum.radzen.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@Larry](https://forum.radzen.com/u/Larry)\
**Post date:** [October 29, 2020, 4:16pm UTC](https://forum.radzen.com/t/new-user-cant-get-datagrid-to-show-anything/5459/7 "2020-10-29T16:16:58Z")

</div>

I thought it might be something simple, thanks, that was it. Now I can play with the grid for a while to evaluate it.
