Master/Details view with XmlDataSources

丶灬走出姿态 提交于 2019-12-11 17:19:34

问题


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

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?

cheers,

--larsw


回答1:


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

I am following a great tutorial on that from Matt Berseth, check his post.

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




回答2:


I'm not sure , But look at these links , hope to help :

http://www.eggheadcafe.com/tutorials/aspnet/d89d1d96-03f1-4784-bbb2-a3db1af393f5/aspnet-datalist-and-data.aspx http://safari.informit.com/9780735625273/index?indexview=D http://my.safaribooksonline.com/0735621764/index?indexview=D http://blogs.msdn.com/adrianvinca/archive/2006/02/15/532449.aspx http://safari.informit.com/9780735625273/index?indexview=D



来源:https://stackoverflow.com/questions/400051/master-details-view-with-xmldatasources

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