This question is locked. New answers and comments are not allowed.
Hi everybody,
I have a very well working master/detail grid for showing companies/contacts information. In the detail grid I have a column button, that should delete the entry identified by 1. the ID of the master grid and 2. the row of the detail grid from a database table. The problem is, that in detail view the value of the expression <#= ID #> (which normally gives the ID of my master) seems to be replaced by the detail ID (selected row in detail).
Here is the code of this button definition:
Am I missing something or has anyone a solution?
Regards
Enrico
I have a very well working master/detail grid for showing companies/contacts information. In the detail grid I have a column button, that should delete the entry identified by 1. the ID of the master grid and 2. the row of the detail grid from a database table. The problem is, that in detail view the value of the expression <#= ID #> (which normally gives the ID of my master) seems to be replaced by the detail ID (selected row in detail).
Here is the code of this button definition:
.Columns(columns =>{ columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Image); commands.Delete().ButtonType(GridButtonType.Image); commands .Custom("removeContact") .Text("Zuordnung löschen") .DataRouteValues(route => { route.Add(c => c.ID).RouteKey("ContactID"); }) .Ajax(true) .Action("ContactsDeleteReference", "Companies", new { CompanyID = "<#= ID #>" }) .HtmlAttributes(new { style = "text-align: center" } ); }).Width(210);})Am I missing something or has anyone a solution?
Regards
Enrico