Click here to Skip to main content
15,923,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have gridview with manually given bound fields, a checkbox list.
i am displaying employee table(Name,Email,Age,Address,Salary) data in grid and column names in checkbox list

from the checkbox list i select only Name and email and click on submit then the grid has to display only Name and Email columns data and remaining should be invisible. I have tried with rowdatbound wherein i am taking the count of columns in grid and checking but its not working.

any suggestions would be appreciated
Posted
Updated 12-Jul-11 4:42am
v2

1 solution

well.... each listitem has a value and and text property.
Each gridviewcolumn has a ID property
If the name of the value is like lstitem1 and the gridviewcolumn datafiield is like colitem1 you sould be able to check if colItem1.Visible = lstItem1.Checked; That's all
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900