Change HeaderText in datagrid
I have a Datagrid with AutoGenerateColumns = True.
How can I rename the headertext without using ASP:BoundColumn? I dont want
to show the database names, but make my own header names. I also need to
have the AutoGenerateColumns = True.
I Use VB.net :)
Re: Change HeaderText in datagrid
With AutoGenerateColumns = True your only chance to catch header text is the
ItemCreated event. In the event handler you can catch the header by checking
e.Item.ItemType property, where e is the event argument of type
DataGridItemEventArgs. Once you detect the header, you can change the header
text as e.Item.Cells.Text.
"Řyvind Isaksen" <email@example.com> wrote in message
> Hi friends!
> I have a Datagrid with AutoGenerateColumns = True.
> How can I rename the headertext without using ASP:BoundColumn? I dont want
> to show the database names, but make my own header names. I also need to
> have the AutoGenerateColumns = True.
> I Use VB.net :)
|All times are GMT. The time now is 05:00 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.