I have developed a page which contains some controls like textboxes, dropdown,etc. I had created the datatable using the sqldataadapter and that works fine by retriving the table using the select command. I want to place the data in a gridview and it also works. Now I want to populate the gridview columns based on my user input controls like hiding or showing selected columns. I don't have the idea how to do this. please help me and advance thanks for your answer

Recommended Answers

All 2 Replies

Hey! I found out the solution. I had turned the visibility like this

GridView1.Columns[1].Visible = true;

It works!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.