开发者

How to bind the gridview to treeview ,like tree structure hold the gridview data

How to bind the gridview control to treeview , when user click for the + symbol the gridview has 开发者_开发技巧to display.. like tree structure hold the gridview data

Thank You


A treeview holds text natively. It is not designed to hold object data in the fashion you're looking for. To achieve this effect you might be better served by nesting a gridview in a gridview with the plus symbol being in the left column as a link/imagebutton and the title or caption in the right column. When the button is clicked you can enter "edit" mode to bring up the edit template, and inside that template can be a separate gridview control that would be bound to the specific data in question. Then click the linkbutton again (which would have been changed to a minus I assume), you could exit edit mode and return to normal. The disadvantage would be that only one row would be able to be open at a time, but that could be worked around by using the regular item template and using viewstate properties to manage row states.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜