Hide UNBOUND datagrid cols?

E

Eddie B.

Is there a way to hide an unbound datagrid column? The webform throws an
error when I try to hide any of the columns that I do not have bound at
design time.
 
A

Alvin Bruney

The easy way to do it is to set the cell.visible property to false in the
itemcreated or itemdatabound event handlers. These events fire off when the
grid creates a row or binds data to the row. The handle is exposed thru the
e argument and references the current row. You are having this exception
because unbound or dynamic rows aren't added to the column collection and
are there for inaccessible from this collection.
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top