# DataGrid fails to render in the Radzen tool for a Swagger API

**URL:** <https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649>\
**Category:** Blazor Server\
**Created:** [April 29, 2021, 7:46pm UTC](https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649 "2021-04-29T19:46:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![travisco\_nabisco](https://forum.radzen.com/user_avatar/forum.radzen.com/travisco_nabisco/32/5600_2.png) [@travisco\_nabisco](https://forum.radzen.com/u/travisco_nabisco)\
**Post date:** [April 29, 2021, 7:46pm UTC](https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649/1 "2021-04-29T19:46:10Z")

</div>

I am working to add a Swagger Data source to Radzen and render the retrieved data in a DataGrid.

I configure the "Invoke data source method" as shown:

 ![InvokeEvent](https://forum.radzen.com/uploads/default/original/2X/7/7a251b586ddb0670911204ce3d15884a72547366.jpeg)

Then I add the data grid and set is Data to "${getApiSoftwareItemPageNoRequestPerPage}"

I immediately get an error  
"The type or namespace naem 'SoftwareImageDto' could not be found (are you missing a using directive ro an assembly referene?) Argument 1: cannot convert from 'dynamic' to 'System.Collections.Generic.IEnumerable'

The SoftwareImageDto is the generated Model class.

Do you have any feedback that may unblock me?

---

<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:** [April 30, 2021, 4:34am UTC](https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649/2 "2021-04-30T04:34:37Z")

</div>

Hi @travisco_nabisco,

Is the error only in designer or you get the same when you run the application? Can you try to manually change the property type?

---

<div class="post-metadata">

**Author:** ![travisco\_nabisco](https://forum.radzen.com/user_avatar/forum.radzen.com/travisco_nabisco/32/5600_2.png) [@travisco\_nabisco](https://forum.radzen.com/u/travisco_nabisco)\
**Post date:** [April 30, 2021, 1:18pm UTC](https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649/3 "2021-04-30T13:18:50Z")

</div>

There error is only in the designer, when I run the application everything is fine.

I currently have the property type for the DataGrid set to an IEnumerable\<Wmds.Models.OpenApiWmds.SoftwareImageDto\> and cannot find anywhere in the generated code where it is would by using the dynamic[] type.

The only reference to the dynamic[] type is for the Attributes collection that is generated for each Page.

I did notice that in most places the Radzen generated code references the type is uses the full namespace definition of "Wmds.Models.OpenApiWmds.SoftwareImageDto" in all places except the Controller classes, is this possible where the issue arises?

---

<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:** [April 30, 2021, 1:30pm UTC](https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649/4 "2021-04-30T13:30:57Z")

</div>

If it works normally runtime most probably the problem is in the designer - we will check if we can fix it for the next update next week.

---

<div class="post-metadata">

**Author:** ![travisco\_nabisco](https://forum.radzen.com/user_avatar/forum.radzen.com/travisco_nabisco/32/5600_2.png) [@travisco\_nabisco](https://forum.radzen.com/u/travisco_nabisco)\
**Post date:** [April 30, 2021, 4:35pm UTC](https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649/5 "2021-04-30T16:35:03Z")

</div>

Thank you for looking into this, if you need my full project just let me know. I have created a minimal project that creates the issue.

---

<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:** [April 30, 2021, 7:15pm UTC](https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649/6 "2021-04-30T19:15:47Z")

</div>

Yes, please send us the project at [info@radzen.com](mailto:info@radzen.com)

---

<div class="post-metadata">

**Author:** ![travisco\_nabisco](https://forum.radzen.com/user_avatar/forum.radzen.com/travisco_nabisco/32/5600_2.png) [@travisco\_nabisco](https://forum.radzen.com/u/travisco_nabisco)\
**Post date:** [May 3, 2021, 6:37pm UTC](https://forum.radzen.com/t/datagrid-fails-to-render-in-the-radzen-tool-for-a-swagger-api/7649/7 "2021-05-03T18:37:07Z")

</div>

I have sent an email with a link to the files in Google Drive.
