C# 可折叠的主细节网格视图结构
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/435921/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
collapsable master detail gridview structure
提问by Adam Right
I need an advice for a c# asp.net project. My client wants to see some reports via the gridview object with master/detail structure.
我需要 ac# asp.net 项目的建议。我的客户希望通过具有主/细节结构的 gridview 对象查看一些报告。
The main gridview will be full by all master data and each row will have a +icon (or button) on the first cells. When user clicks this icon, the all details data of that master row should be seen under that master row with collaps action.
主 gridview 将被所有主数据填满,每一行的第一个单元格上都有一个+图标(或按钮)。当用户单击此图标时,该主行的所有详细信息应显示在该主行下并具有折叠操作。
I can handle the database proccess but i can not figure out the collapsing part. How can i put some extra rows under the specific row on the gridview object?
我可以处理数据库过程,但我无法弄清楚折叠部分。如何在 gridview 对象的特定行下放置一些额外的行?
Thanks in advance..
提前致谢..
采纳答案by Adam Right
Thanks but its for updating or inserting. Instead , i have found that page, it seems more effective.
谢谢,但它用于更新或插入。相反,我发现该页面似乎更有效。
GridView control to show master-child or master-slave data, written in c#, asp.net, and javascript.
回答by SchaeferFFM
There is a CodeProject article with downloadable source:
有一篇带有可下载源代码的 CodeProject 文章:
回答by balexandre
Matt Bersethhas one of the most impresive tutorials on this kind'a stuff
Matt Berseth有关于这种东西的最令人印象深刻的教程之一
it contains til now 28 tutorialsonly on the GridView plus a lot from other asp.net controls as well using jQuery with them. I do learn plenty with him. I really love his work and I just wanna share this with you, you might actually get some good and professional ideas from his code!
到目前为止,它仅包含28 个关于 GridView 的教程,以及许多来自其他 asp.net 控件以及使用 jQuery 的教程。我和他一起学到了很多东西。我真的很喜欢他的工作,我只是想和你分享这个,你实际上可能会从他的代码中得到一些好的和专业的想法!
回答by parla
Here is another good CodeProject blog. Explains multilevel master/detail without JavaScript.
这是另一个很好的 CodeProject 博客。不使用 JavaScript 解释多级主/细节。
http://www.codeproject.com/KB/aspnet/MultiNestMDGridview.aspx
http://www.codeproject.com/KB/aspnet/MultiNestMDGridview.aspx
回答by cjbarth
This is the easiest to use control I've ever run across:
这是我遇到过的最容易使用的控件: