We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Cell dropdown displaying model value!!

Hello,
I have a grid bound to a local list of JS objects.
One of the grid cells is defined to be a dropDown list which is bound to another local list of JS object. The object is mapped to this C# class:

class Tax
{
int id {set;get;}
string name{set;get;} routerlogin
}
When the grid is displayed and not in edit mode, i expect it to show the tax value as a string representing the name of the tax (ex: Local, Export ...), but i am getting the id of the tax displayed instade.
Here is how i define the dropdown: whatsapp web

@{
List ctries = CrescendoPMS.Models.Country.Get(); // This is for showing purpose only, in reality, the controller is getting the values from the model class
var dropDown = new Syncfusion.EJ2.DropDowns.DropDownList()
{
DataSource = ctries,
Query = "new ej.data.Query()",
Fields = new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings { Value = "id", Text = "name" },
};
}

and in the grid i have this:
...
col.Field(nameof(CrescendoPMS_BL.Models.invoice_line.tax_id)).EditType("dropdownedit").Edit(new { @params = dropDown }).HeaderText("Tax").Add();
...


Loader.
Up arrow icon