Sep 16, 2013, 2:57 PM
[CLOSED] Reload asp:Repeater from DirectMethod
Hi, is possible update asp:Repeater control from DirectMethods call?
My code:
HTML
Any suggestion?
My code:
HTML
<ext:Container ID="ContainerScript" runat="server" IDMode="Explicit" IsDynamic="False" Namespace="App">
<Content>
<script type="text/jscript">
function ParticiparEvento_Clique(idEvento) {
try {
App.direct.ParticiparEvento_Clique(idEvento);
} catch (e) {
ShowMessageBoxError(e);
}
}
</script>
</Content>
</ext:Container>
<div class="xxxxxx">
<asp:Repeater ID="RepeaterCampeonato" runat="server">
<HeaderTemplate>
<div class="">
</HeaderTemplate>
<ItemTemplate>
<div class="">
<div class="">
<div class="">ANO</div>
<div class=""><%# DataBinder.Eval(Container.DataItem, "DataInicio", "{0:yy}") %></div>
</div>
<div class="">
<div class="">
<div class="">
<img src="../Resources/images/btn_participar_icon.png" alt="" width="45" height="43" class="tab_btn_img" />
<span class="" onclick="ParticiparEvento_Clique(<%# DataBinder.Eval(Container.DataItem, "Id") %>); return false;">Test</span>
</div>
</div>
</div>
</div>
</ItemTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
</asp:Repeater>
</div>
C# [DirectMethod(ShowMask = true)]
public void ParticiparEvento_Clique(int idEvento)
{
try
{
using (xx = new xxx())
{
...
List<EventoCustomizado> eventos = eventoNegocio.ObterTodosAtivos(Master.UsuarioLogado.Id);
RepeaterCampeonato.DataSource = eventos;
RepeaterCampeonato.DataBind();
...
RepeaterCampeonato.Update(); //optional test
}
}
catch (RegraVioladaException ex)
{
...
}
catch (Exception ex)
{
...
}
}
The repeater not update...Any suggestion?
Last edited by Daniil; Sep 25, 2013 at 5:25 AM.
Reason: [CLOSED]