Using GridColumns to build a razor component

Is it possible to build a razor component with

<GridColumns>

<GridColumn>

    <NavLink rel='nofollow' href="@($"product/{Product.ProductId}")">

@Product.ProductName

    </NavLink>

</GridColumn>

<GridColumn>@Product.ManufacturerName</GridColumn>

<GridColumn>@Product.SubCategory</GridColumn>

</GridColumns>

with Parameters and EventCallBacks and use it in the <SFGrid><SFGrid> component.

It is to replace an existing component which was part of a HTML Table element

    <tr>

        <td>

            <NavLink rel='nofollow' href="@($"product/{Product.ProductId}")">

                @Product.ProductName

            </NavLink>

        </td>

        <td>@Product.ManufacturerName</td>

        <td>@Product.SubCategory</td>

    </tr>

Please provide an example if possible


1 Reply

VN Vignesh Natarajan Syncfusion Team September 15, 2021 06:14 AM UTC

Hi Ola,  

Thanks for contacting Syncfusion support.  

Query: “Using GridColumns to build a razor component” 

Yes, we can achieve your requirement (to build razor component in GridColumn) using ColumnTemplate feature of the Grid. We have already discussed this topic in our UG documentation. Refer the below UG documentation for your reference 


Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan  



Loader.
Up arrow icon