On Mar 8, 5:15 pm, "Eliyahu Goldin"
<REMOVEALLCAPIT ALSeEgGoldD...@ mMvVpPsS.orgwro te:
How do you set the headers?
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin
"fredd00" <frederic.nou.. .@gmail.comwrot e in message
news:11******** **************@ c51g2000cwc.goo glegroups.com.. .
On Mar 8, 1:34 pm, "Eliyahu Goldin"
<REMOVEALLCAPIT ALSeEgGoldD...@ mMvVpPsS.orgwro te:
Try RowCreated event.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin
"fredd00" <frederic.nou.. .@gmail.comwrot e in message
>news:11******* *************** @q40g2000cwq.go oglegroups.com. ..
hi
i'm trying to change the gridview columns header text
the columns are not auto generated, i have set specific headertext
values for each column
i want to change the header text based on the specific header text. i
want to load a new text from a global resource file.
what i'm actually trying to do and is not working :
protected void RowDataBound(ob ject sender, GridViewRowEven tArgs e)
{
if (e.Row.RowType == DataControlRowT ype.Header) //
DataControlRowT ype.DataRow
{
foreach (TableCell tc in e.Row.Cells)
{
string s =
(string)GetGlob alResourceObjec t("General", tc.Text);
if (s != null)
{
tc.Text = s;
}
}
}
}
the problem is that tc.Text is always ""
if i'm going through a DataControlRowT ype.DataRow there is text in
tc.Text
any idea when the header text if filled in ?
Hi
I did try the row created event but the tc.Text is always ""
any other idea ?
i set the header text in the gridview declaration
<Columns>
<asp:BoundFie ld DataField="titr e" HeaderText="Tit le"
SortExpression= "titre" meta:resourceke y="BoundFieldRe source1" />
<asp:BoundFie ld DataField="Desc ription"
HeaderText="Des cription" SortExpression= "descriptio n"
meta:resourceke y="BoundFieldRe source2" />
<asp:BoundFie ld DataField="Lang ue" HeaderText="Lan gue"
SortExpression= "langue" meta:resourceke y="BoundFieldRe source3" >
<ItemStyle HorizontalAlign ="Center" />
</asp:BoundField>
<asp:BoundFie ld DataField="Dure e"
HeaderText="Dur ation" SortExpression= "Duree"
meta:resourceke y="BoundFieldRe source4" >
<ItemStyle HorizontalAlign ="Right" />
</asp:BoundField>
<asp:BoundFie ld DataField="STD" HeaderText="STD "
SortExpression= "std" meta:resourceke y="BoundFieldRe source5" >
<ItemStyle HorizontalAlign ="Center" />
</asp:BoundField>
<asp:BoundFie ld DataField="ID_O ffre" HeaderText="ID"
meta:resourceke y="BoundFieldRe source6" />
</Columns>
when does the header text binding occur , when can i retrieve the
header text values ?