开发者

How to display only those columns in the gridview according to which dropdownlist the user selects

For example i have three dropdownlists and the the user selects Say Name and PIN dropdownlist i want results that match the two to be displayed not any other what should I do?

Please help! :/

EDIT:

What i want to do is based on what dropdown list the user makes the selection from i want to display only those columns in the gridview on the next page and two fields name and pin corresponding to those rows will always be displ开发者_JS百科ayed ... if i try permutaion combinations i would have to make 81 sql queries. What should I do?


Each column has a Visible attribute; one approach could be to bind the entire list of columns, and show/hide only the columns you want to show. Alternatively, you could dynamically add the BoundField columns dependant on the selection.

HTH.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜