<ej-grid id="FlatGrid" datasource="@ViewBag.dataSource" allow-paging="true" >
. . .
<e-columns>
<e-column field="id.employID" is-primary-key="true" header-text="ID" width="90"></e-column>
. . .
</e-column>
</e-columns>
</ej-grid>
@server side model class
public class Orders
{
public Orders()
{
}
. . .
public ObjectID id { get; set; }
. . .
}
public class ObjectID
{
public string Name { get; set; }
public int employID { get; set; }
public ObjectID(int id, string name)
{
this.Name = name;
this.employID = id;
}
}
|