Dynamic Header in GridView

D

DJE

Is it possible to make the header of a gridview contain data from the
grid? I have nested gridviews and in the Child gridview I want the
column heading to be "Email To Tom" for Parent Row1, "Email To Dick"
for the Child grid in Parent Row2, "Email To Harry" for the Child
grid in ParentRow3, etc...where "Tom", "Dick" and "Harry" all come
from the datagrid or datasource. It seems like I need to know the
values before they are available.
 
M

Morten Wennevik [C# MVP]

Hi,

I don't remember the exact procedure at the moment, but I believe you should
be able to do this using an event, possibly DataGridView.RowEnter. Try
trapping this event, and set the header using the CurrentRow data.
 

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

Top