display different columns in table

M

Matthew Louden

To display the table with all columns, we can do this:

Dim dt As DataTable = ds.Tables(0)
dgEmployeeInfo.DataSource = dt
dgEmployeeInfo.DataBind()


I want to create check boxes with all the columns, so that users can select
which column (data field) to display. Any ideas??
 
R

Rajesh Patel

yes, you can do that. create gridcolumnstyles for all the columns under
tablestyle.

give checkboxes on the form.

when he turned on any checkboxes. change width of particular gridcolumnstyle
to zero. when he turned off checkbox give nonzero positive width to the
gridcolumnstyle of particular column.

Rajesh Patel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top