使用分层下拉列表进行 RadGrid 内联编辑

发布于 2024-08-15 06:58:36 字数 380 浏览 4 评论 0原文

有人看过可以帮助我解决这个问题的演示或论坛帖子吗?

我想要做的是拥有一个具有内嵌编辑功能的 RadGrid。我有三列:“类别”、“问题”和“答案”,我想使用下拉列表。

但是,我想做的是当选择“类别”时,重新填充“问题”的下拉列表。另外,当选择“问题”时,我想重新填充“答案”的下拉列表,

我在这里查看了演示:网格/自动操作 这接近我正在寻找的内容,但是它没有分层下拉菜单。

任何想法/意见/建议将不胜感激。

Has anybody seen a demo or forum post that might help me out with this issue?

What I'm looking to do is to have a RadGrid with in-line editing. I have three columns, "Category", "Question", and "Answer", which I'd like to use drop down lists for.

However, what I'm looking to do is when a "Category" is selected, to repopulate the drop down list of "Questions". Also, when a "Question" is selected, I'd want to repopulate the drop down for "Answers"

I checked out the demo here: Grid / Automatic Operations and this is close to what I'm looking for, however it does not have the hierarchical drop downs.

Any ideas/comments/suggestions would be greatly appreciated.

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

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

发布评论

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

评论(2

少女七分熟 2024-08-22 06:58:36

The example found here Rows - Accessing Cells and Rows should provide you with the information you need.

墨离汐 2024-08-22 06:58:36

在第一个下拉列表 Changed 事件(启用自动回发)中,从发送者对象(第一个下拉列表)的父级强制转换 GridItem。

然后,一旦您拥有 griditem,请通过 gridItem.FindControl 投射第二个下拉列表并从那里开始工作。

我面前没有 VS,所以不是最简洁的答案,抱歉。

编辑 - 在网格中使用自定义控件可能会更干净、更容易扩展,RadGrid 对此非常有用。

On the first drop down lists Changed event (enable auto post back) cast the GridItem from the sender object's (the first drop downlist) parent.

Then once you have the griditem, do cast the second drop down list via gridItem.FindControl and work from there.

I dont have VS infront of me so not the most concise answer, sorry.

Edit - it could be cleaner and easier to extend to use a custom control in the grid, RadGrid is great for this.

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