The documentation here:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-binding/model-binding-and-strongly-typed-data-controls-support
gives a Signature for Modelbinding Delete like this.
public void DeleteProduct(int ProductID
)
I tried to implement it, but first I get an ASP.NET error, saying the Method has to allow Reference-Types, because the Grid wants to pass NULL to it.
I changed it to (int? ProductID), the error disappeared, but still the key ID null, although I have specified the
DataKeyNames="ProductID"
Also:
SelectMethod="Select" DeleteMethod="Delete" UpdateMethod ="Update" InsertMethod ="Insert"
Attributes in the RadGrid Tag, sometimes in the MasterTableView Tag, does this make a difference ?
The question is not just on Delete, Update behaves in the same way, saying it hast to be an "int?"
May be I'm mixing up different binding models here ?
Why is Delete(int ProductId) not working ?
Is thery any Switch to say "I want to do Model binding" ?