Man oh man . . .
It worked - THANKS
I understand how that would work - I already have quite a bit of items I'm
binding to within the ItemDataBound sub but didn't realize that for headers,
it fires up once so I can set them up.
Again, thanks.
Regards
John.
"Steven Berkovitz" <mb****@communi ty.nospam> wrote in message
news:e5******** ******@TK2MSFTN GP14.phx.gbl...
John,
If you want to programatically access a control which is part of a DataGrid,
you need to handle it in the ItemDataBound event.
your code will look something like this in the ItemDataBound event handler:
if(e.ItemType == ListItemType.It em || e.ItemType ==
ListItemType.Al ternateItem)
{
Label lbl = (Label)e.Item.F indControl("con trolName");
lbl.Text = "Hello World";
}
Hope this helps.
"John" <a@b.com> wrote in message
news:uI******** ******@TK2MSFTN GP10.phx.gbl...
Hi all,
Am I allowed to use labe;s within the datagrid heading section? Each time
I
drag a label onto the design, I can set the properties and such (including
runat=server) but the code-behind refuses to accept/acknowledge it's
existence.
Am I just doing something wrong and if so, what?
Regards
John.