Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Sangra M via .NET 247 #1
Change HeaderText of datagrid after binding
(Type your message here)
--------------------------------
From: Sangra
Hi,
I got a datagrid which I want to change the headertext after binding.
Because I have a multi-lingual app and I allow the user to change the
language on-the-fly. However, the headertext changes only after the
2ND TIME I pressed the Change language button. I'm doing the change
during the Page_Load event and I suppose the ASP.NET takes the
values of the headertexts BEFORE it, so it will be showed only on the
next time!
My question is what is the correct event I should catch and change the
text?
Many thanks in advance!
-----------------------
Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
<Id>GgIRLqizMEW0GTv0rPM03A==</Id>
Sangra M via .NET 247 Guest
-
setting headertext for a datagrid column
Hey, can someone help me with this? I'm trying to change the headerText for a datagrid column programmatically. I'm not trying to create the... -
How do I change the headertext of a datagrid column programmatically
Hi, I have a datagrid to view the results from a database. I am using autogenerate because the number of columns returned from the database... -
change HeaderText of DataGrid in PreRender().
I need change HeaderText of DataGrid in PreRender(). But it seems doesn't work. The code example like this: Protected Overrides Sub... -
DataGrid Dynamic HeaderText
Hell How can I change the headerText of an AutoGenerateColumns DataGrid myDataGrid.DataSource=ds.Tables.DefaultView myDataGrid.DataBind()... -
How to change datagrid column HeaderText from C#
You can do thisn DataGrid_ItemCreated Event HTH Prasad "MarkMurphy" <murphy@murphysw.com> wrote in message... -
Sylvain Lafontaine #2
Re: Change HeaderText of datagrid after binding
Using the datagrid's ItemCreated event is probably the best choice. The
ItemDataBound won't work in this case because the header is not an item (not
associated with a data). See for example:
[url]http://msdn.microsoft.com/msdnmag/issues/01/10/cutting/default.aspx[/url]
[url]http://www.codeproject.com/aspnet/MergeDatagridHeader.asp[/url]
[url]http://www.datagridgirl.com/articles.aspx[/url]
S. L.
"Sangra M via .NET 247" <anonymous@dotnet247.com> wrote in message
news:uzz2goHKFHA.3336@TK2MSFTNGP10.phx.gbl...> (Type your message here)
>
> --------------------------------
> From: Sangra
> Hi,
> I got a datagrid which I want to change the headertext after binding.
> Because I have a multi-lingual app and I allow the user to change the
> language on-the-fly. However, the headertext changes only after the
> 2ND TIME I pressed the Change language button. I'm doing the change
> during the Page_Load event and I suppose the ASP.NET takes the
> values of the headertexts BEFORE it, so it will be showed only on the
> next time!
> My question is what is the correct event I should catch and change the
> text?
> Many thanks in advance!
>
> -----------------------
> Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
>
> <Id>GgIRLqizMEW0GTv0rPM03A==</Id>
Sylvain Lafontaine Guest



Reply With Quote

