views:

20

answers:

1

I bind custom DataTable to DataGrid through ObjectDataSource, where i use SelectMethod and UpdateMethod. SelectMethod working great, but when I try to update row it's breaking by MissingMethodException. What should i do to fix this problem?

Sorry for my bad english ;)

A: 

Make sure that your update method has the right parameters. For example if in your grid you have the following fields:

<asp:BoundField DataField="Id" HeaderText="ID:" />
<asp:BoundField DataField="Name" HeaderText="Name :" />

your update method could look like this:

public void Update(int Id, string Name) 
{
    //...
}

Here's a full example.

Darin Dimitrov
I'm sure that it's not because of parameters :(
tartakynov
Maybe you could show the relevant portion of your source code? Right now it's more of a guessing. Remember that the more information you provide the more rapidly and precisely the problem will be found.
Darin Dimitrov