Telerik Ajax RadGrid 中的混合读/写和只读行?

发布于 2024-10-09 19:57:24 字数 345 浏览 0 评论 0原文

我正在从数据表填充 telerik:RadGrid。 DataTable 中的每个 DataRow 都有一个值为 true 或 false 的“只读”列。

网格当前有一个 GridEditCommand 列和一个触发“删除”命令的 GridButtonColumn。

我需要的是显示“readonly”为只读记录的行。我需要 GridEditCommand 列中的图标有所不同,并单击它来调出查看详细信息表单,而不是编辑表单。我需要“删除”GridButtonColumn 中的链接不存在。

看起来创建一个不允许用户编辑或删除记录的表非常简单,但我需要能够让某些行可编辑,而某些行则不可编辑。

我应该从哪里开始?

I am populating a telerik:RadGrid from a DataTable. Each of the DataRows in the DataTable has a "readonly" column with a value of true or false.

The grid currently has a GridEditCommand column, and a GridButtonColumn that triggers the "Delete" command.

What I need is for rows that display records for which "readonly" is true to be read-only. I need the icon in the GridEditCommand column to be different, and for clicking it to bring up a view-details form, instead of an edit form. And I need the link in the "Delete" GridButtonColumn to be absent.

It looks like it'd be pretty straightforward to create a table that doesn't allow the user to edit or to delete records, but I need to be able to have some rows editable and some not.

Where should I start?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羁〃客ぐ 2024-10-16 19:57:24

这是可能的;我建议在左侧,图像是一个命令按钮,您可以根据在 itemcommand 事件中所做的选择来触发正确的操作。要更改图标,您需要点击 rowdatabound 事件并以编程方式更改它。现在为了显示视图详细信息,我不知道 Telerik 网格是否有内置的只读视图;这可能必须通过网格外部的控制来可编程地完成。

HTH。

This is possible; I'd recommend on the left, the image be a command button, and you trigger the right action depending on the selection you make in itemcommand event. To change the icon, you'd need to tap into the rowdatabound event and programmably change it. Now for showing view details, I don't know if the Telerik grid has something built-in for the read-only view; this may have to be programmably done with a control outside of the grid.

HTH.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文