Do you instantiate the template in every request? Best way to do it would be
in OnInit event of the Page.

Signature
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
> Hello!
>
[quoted text clipped - 31 lines]
>
> I have no more ideas how to solve this problem, please help me.
beton3000@gmail.com - 01 Sep 2007 17:43 GMT
Thank you for your answer.
I have a reload_controls() method which is run in following cases:
Page_Load / !IsPostBack
GridView_RowEditing
GridView_RowCancelingEdit
reload_controls() consists code which read data from controls on page,
builds gridview (using template fields) and finally calls
GridView.DataBind(). If I try to run reload_controls() from OnInit, I
see an obvious error saying that controls are not instantiated.
Unfortunatelly I need to read from other controls to build gridview...
> Do you instantiate the template in every request? Best way to do it would be
> in OnInit event of the Page.
[quoted text clipped - 44 lines]
>
> - Poka cytowany tekst -
Teemu Keiski - 02 Sep 2007 08:04 GMT
Hi,
see: http://discuss.joelonsoftware.com/default.asp?dotnet.12.350266.2

Signature
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
> Thank you for your answer.
>
[quoted text clipped - 61 lines]
>>
>> - Poka cytowany tekst -
beton3000@gmail.com - 02 Sep 2007 20:16 GMT
Thank you very much Teemu. This solution sounds very reasonable.
Unfortunately my time for this problem passed by and I decided not to
use GridView at all in this case... I will build custom table with
checkboxes.
> Hi,
>
[quoted text clipped - 75 lines]
>
> - Poka cytowany tekst -