Hi Emil,
Thanks for using Syncfusion products.
Query1: “if i try to edit any row not first row, it always edits first row”
From your query, we understand that you are not able to edit the Grid rows properly. From your code example, we have found that you rendered the Grid with autoGenerated column. So IsPrimaryKey property is not assigned to any of the available column. This is the cause of the issue.
Refer below link for our knowledge base document for the importance of PrimaryKey property in ejGrid while editing.
Also refer the below UG document how to define the PrimaryKey for autogenerated column.
Query2: “Beside that I try to persist data to server but my item object is always empty. ”
By default while editing, we have passed the model values using property called “value”. So we suggest you to define the parameter as value in the server side.
Refer the modified code example
public async Task<ActionResult> Edit(Item value)
{
if (ModelState.IsValid)
{
}
return View(item);
}
|
Refer our UG documentation for your reference
Please get back to us if you have further queries.
Regards,
Vignesh Natarajan