开发者

Gridview updates within an Updatepanel

What is the best way, using ASP.NET and C#, to tackle the following problem?

I have a database containing a companies table, product table (each company has multiple products, though the tables aren't linked), and a details table.

What I'd like is to display the companies table. Selecting a company reveals the products table for that company. Selec开发者_JAVA百科ting a product reveals a details table.

I'd like to place this all inside an update panel, so that only this part of the page updates, and was wondering what the community thought was the best approach.

I'm wondering, currently, whether it's possible to programmatically change the datasource of a single gridview. Or perhaps it would be best to have multiple gridviews and change visibility?

Or perhaps gridviews are not the way to go? I don't know.

Any feedback would be greatly appreciated!


I achieved one level of nesting easily with the ListView, which was great because it gave me full control over the UI so I could create the nesting process easily, I could devote two TR tags per entry, the first contains the details, and the second contains the drop down panel. You could easily next two-three levels of panels. You can easily setup multiple Lists to create the nested structure. I wrote JS script to show/hide the panels.

That I found worked for me.

HTH.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜