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;}
}
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.
@{
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();
...