RadGrid — Not able to edit all rows except last row

╄→гoц情女王★ 提交于 2019-12-24 12:02:03

问题


I am able to edit (double click) only the last row in a RadGrid. When I select any other row it throws an error.

There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.

Has anyone faced this problem? If I'm able to edit one row why not others?


回答1:


You have to declare the dataKeyNames in your MasterTableView .
For Example , if your table has three columns(Column1,Column2,Column3)

<telerik:RadGrid ID="RadGrid1" runat="server">
  <MasterTableView DataKeyNames="Column1,Column2,Column3">  
  </MasterTableView>
</telerik:RadGrid>


来源:https://stackoverflow.com/questions/18148345/radgrid-not-able-to-edit-all-rows-except-last-row

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!