Q: datagrid header/footer

G

Guest

Hello,
Is it possible to change a datagrid Header and Footer text in code behind
dynamically?
Thanks,
Jim.
 
G

Guest

Jim, at ItemDataBound you can get at header and footer, e.g. e.Item.ItemType
= ListItemType.Header. From there I'd use findcontrol to get the controls you
want to modify.

Bill
 
G

Guest

Jim, some good articles are here:

http://dotnetjunkies.com/tutorial/b8550e4b-b8f5-4446-b065-0b19f4c739bc.dcik
(Peter van Ooijen)
and here:
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx (Scott Mitchell)

After you understand the basics, the rest of what you do where depends on a
few things. Come back with a few specifics--for one, are these template
columns, and for two, do you know what you want to change the header/footer
to *before* you load the data in the grid or not till *after*?

Bill
 
J

JIM.H.

Thanks Bill for the reply.
My data grid works fine and I am doing edit/insert/delete kind of
things, that is way I am looking an easiest way to reach the footer of
a column and set a text there.

So I am looking something like
DataGrid1.Footer[ColumnName].Text="myText", is this possible?
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top