Kseniya Garipova
Top achievements
Rank 1
Kseniya Garipova
asked on 13 Sep 2008, 06:25 PM
Hello!
I want to place a user control inside of AJAXLoadingTemplate. (The purpose is to show localized images depending on current culture)
But for dealing this datagrid data I use RadGrid_NeedDataSource event and, thus, do not call DataBind() method explicitly. As a result - data in AJAXLoadingTemplate is not bound and there is no images while loading.
What can I do in order to bind data in AJAXLoadingTemplate?
Thanks!
I want to place a user control inside of AJAXLoadingTemplate. (The purpose is to show localized images depending on current culture)
But for dealing this datagrid data I use RadGrid_NeedDataSource event and, thus, do not call DataBind() method explicitly. As a result - data in AJAXLoadingTemplate is not bound and there is no images while loading.
What can I do in order to bind data in AJAXLoadingTemplate?
Thanks!
4 Answers, 1 is accepted
0
Hi Kseniya Garipova,
I suggest, if appropriate in your scenario, to try calling explicitly UserControl's Bind method in its PageLoad event. Please give it a try and let us know how it went.
Greetings,
Rosen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I suggest, if appropriate in your scenario, to try calling explicitly UserControl's Bind method in its PageLoad event. Please give it a try and let us know how it went.
Greetings,
Rosen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kseniya Garipova
Top achievements
Rank 1
answered on 16 Sep 2008, 10:24 AM
Hi Rosen,
I tried, but no luck. Here is the code from RadGrid:
<AJAXLoadingTemplate>
<ems:DivLoading ID="divLoading" runat="server" />
</AJAXLoadingTemplate>
Here is the code of DivLoading control:
<asp:Image ID="img" runat="server" ImageUrl='<%# LoadingSrc %>' />
protected void Page_Load(object sender, EventArgs e)
{
this.DataBind();
}
Page_Load() is called, but at those moment control "img" doesn't exist yet. On the other hand, if I place DivLoading in any other place (including AjaxLoadingPanel for using with RadAjaxManager) - it works well.
Am I doing something wrong?
I tried, but no luck. Here is the code from RadGrid:
<AJAXLoadingTemplate>
<ems:DivLoading ID="divLoading" runat="server" />
</AJAXLoadingTemplate>
Here is the code of DivLoading control:
<asp:Image ID="img" runat="server" ImageUrl='<%# LoadingSrc %>' />
protected void Page_Load(object sender, EventArgs e)
{
this.DataBind();
}
Page_Load() is called, but at those moment control "img" doesn't exist yet. On the other hand, if I place DivLoading in any other place (including AjaxLoadingPanel for using with RadAjaxManager) - it works well.
Am I doing something wrong?
0
Hello Kseniya,
I have attached a simple page which demonstrates the described approach. Please give it a spin and let us know how it went. Maybe I'm missing something obvious.
Greetings,
Rosen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I have attached a simple page which demonstrates the described approach. Please give it a spin and let us know how it went. Maybe I'm missing something obvious.
Greetings,
Rosen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kseniya Garipova
Top achievements
Rank 1
answered on 22 Sep 2008, 08:19 AM
Hello Rosen,
Thank you! It works.
It was I who missed something obvious. :)
Thank you! It works.
It was I who missed something obvious. :)