开发者

ASP.NET troubles with updating DataGrid binded to custom DataTable

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 ;)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜