Wrong sequence of columns if a column is a razor component

Hi,

To make life easy, I made a few razor components of gridcolumns in seperate razor files. This works, except that the order of columns is wrong. The grid will generate with all the normal columns first, and then the external razor components. I can only solve this by making a razor component of every column or not making razor components at all. How can I solve this in a different way. I only want to make use of razor components when this makes sense.

Example:

<GridColumns>

    <CustomColumnComponent Field="Id" />

    <GridColumn Field="Name" />

</GridColumns>

This will generate in this order: Name | Id


1 Reply 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team February 16, 2022 09:52 AM UTC

Hi Gideon, 
 
Greetings from Syncfusion support. 
 
We have already documented this topic on proper way of rendering custom GridColumn component in Grid. We suggest you to refer and modify your custom GridColumn as like the below kb to overcome the reported scenario. 
 
Please get back to us if you need further assistance. 
 
Regards, 
Renjith R 


Marked as answer
Loader.
Up arrow icon