ItemDataBound is triggered during data binding so you can't tell "when" it
fires. I'd like to change language on page using dropdownlist control (with
languages "supported" by page). That change will be first present in
dropdownlist change eventhandler and than I can set CurrentUICulture to
choosen language. All easy controls (ButtonLink etc.) are not "ready" until
prerender, so I can change any proprety like "text" of such control in
prerender without problems. Template controls are "ready" in prerender and
that's my problem :(
Adam
"Eliyahu Goldin" <removemeegoldin@monarchmed.com> schrieb im Newsbeitrag
news:%23GQEkjq2EHA.3708@TK2MSFTNGP14.phx.gbl...
[quoted text, click to view] > If DataGrid1.HeaderText = "MyHeader" doesn't effect in PreRender, what
> about ItemDataBound event?
>
> Eliyahu
>
> "Adam Boczek" <adam.boczek@gmx.de> wrote in message
> news:O8XiUdq2EHA.524@TK2MSFTNGP09.phx.gbl...
>> Hi Eliyahu,
>>
>> I don't use autogenereted columns ;))
>>
>> Maybe I should say it more cleary. When you call DataBind on DataGrid,
>> it builds etire control from information stored in template objects.
>> Usually you call DataBind in OnLoad handler or in same postback event
>> handlers. That means that your grid (or martix of controls) is already
>> created in PreRender. I can't set DataGrid1.HeaderText = "MyHeader" in
>> PreRender because this is a template property and such change dosn't
>> affect.
>>
>> I'd like to change my datagrid's headers according to launguage in
>> dropdownlist (autopostback). I can do it only in prerender handler (I
>> have a base class for all my datagrids). I can find header cells walking
>> through Controls (DataGrid.Controls[0].Controls[0] etc.) but I can't set
>> any Id to easy recognize "my" headers.
>>
>>
>>
>> *** Sent via Developersdex
http://www.developersdex.com ***
>> Don't just participate in USENET...get rewarded for it!
>
>