XmlDataSources的“主/详细信息”视图 [英] Master/Details view with XmlDataSources

查看:88
本文介绍了XmlDataSources的“主/详细信息”视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本的测试Web表单,其中包含一个DataList和一个DetailsView以及每个组件的两个XmlDataSource组件。

I have a basic test web form with a DataList and a DetailsView and two XmlDataSource components for each of them.

DataList与基础XML文档的绑定设置起来很容易,但是我一直在努力将DetailsView连接起来。这个想法是,两个可绑定控件之间存在主/明细关系,所以我想我应该挂接到DataList上的OnSelectedItemIndexChanged上,以对DetailsView中当前选定的项目进行绑定。但是相关的键是什么/当我使用XmlDataSource使其工作时如何设置DataKeyField?

The binding of the DataList to the underlying XML document was easy to set up, but I'm struggling with getting the DetailsView hooked up. The idea is that there is a master/details relationship between the two bindable controls, so I guess I should hook onto the OnSelectedItemIndexChanged on the DataList to do the binding of the currently selected item in the DetailsView. But what is the correlating key / how do I set a DataKeyField when I use a XmlDataSource to get this to work?

欢呼,

-larsw

推荐答案

哇!我现在正在执行此操作,但是使用对象数据源:)

Wow! I'm doing exactly that right now but using Object Data Source :)

我正在从马特·伯斯(Matt Berseth)查看他的帖子

几乎是相同的,唯一的是您使用了其他DataSource,但其余部分都是相同的!

It will be almost the same, the only thing is that you use other DataSource, but the rest is the same!

这篇关于XmlDataSources的“主/详细信息”视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆