【问题标题】:RadGrid -- Not able to edit all rows except last rowRadGrid -- 无法编辑除最后一行之外的所有行
【发布时间】:2013-08-09 13:54:49
【问题描述】:

我只能编辑(双击)RadGrid 中的最后一行。当我选择任何其他行时,它会引发错误。

从数据源中提取 DataKeyValues 时出现问题。请确保正确指定 DataKeyNames 并且指定的所有字段都存在于 DataSource 中。

有人遇到过这个问题吗?如果我能够编辑一行,为什么不能编辑其他行?

【问题讨论】:

  • 这是行?不是专栏?你能告诉我你的代码吗?

标签: c# telerik radgrid


【解决方案1】:

您必须在 MasterTableView 中声明 dataKeyNames
例如,如果您的表有三列(Column1,Column2,Column3)

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

【讨论】:

    猜你喜欢
    • 2012-11-07
    • 1970-01-01
    • 1970-01-01
    • 2011-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-30
    相关资源
    最近更新 更多