<style>
#editor.e-inplaceeditor .e-editable-value-wrapper .e-editable-value,
#editor.e-inplaceeditor .e-editable-value-wrapper .e-editable-overlay-icon::before {
font-size: 17px;
}
</style>
|
public class HomeController : Controller
{
List<gameList> game = new List<gameList>();
public ActionResult Index()
{
game.Add(new gameList { Id = "1", Name = "Maria Anders" });
game.Add(new gameList { Id = "2", Name = "Ana Trujillo" });
game.Add(new gameList { Id = "3", Name = "Antonio Moreno" });
game.Add(new gameList { Id = "4", Name = "Thomas Hardy" });
game.Add(new gameList { Id = "5", Name = "Chiristina Berglund" });
game.Add(new gameList { Id = "6", Name = "Hanna Moos" });
ViewBag.value = "Maria Anders";
ViewBag.model = new { dataSource = game, fields = new { text = "Name" }, Placeholder = "Select a customer" };
return View();
}
public class gameList
{
public string Id { get; set; }
public string Name { get; set; }
}
public class SubmitModel
{
public string Name { get; set; }
public string PrimaryKey { get; set; }
public string Value { get; set; }
}
public IEnumerable<SubmitModel> UpdateData([FromBody]SubmitModel value)
{
// User can process data
return value;
}
we found only text value can return to server, How could be return ID value stead of text? Also after we have save the ID value to server, could in-place editor display the text value on screen?
Please advance, thx.
KennethT