This is a migrated thread and some comments may be shown as answers.

Radwindow databind problem

2 Answers 150 Views
Window
This is a migrated thread and some comments may be shown as answers.
OPA
Top achievements
Rank 1
OPA asked on 16 Aug 2013, 02:08 PM
<Windows>
<telerik:RadWindow ID="rw_confirm_client" Modal="true" Behaviors="None" VisibleStatusbar="false"
             runat="server" CssClass="RwConfirmacion" VisibleTitlebar="false" Height="10"
             Width="10">
<ContentTemplate>
<div class="BoxConfirmationContent">
<img src="../App_Themes/Opa.Tema/Imagenes/Pregunta.png" id="Img3" class="ImgNotifcacion"
   runat="server" />
<table class="TbMensajeConfirmacion">
<tr>
<td class="botoncerrarmensajero">
<asp:LinkButton href="#" runat="server" ID="LinkButton2" CssClass="linkcerrar"
           OnClientClick='closeCustomConfirmClient();'>X</asp:LinkButton>
</td>
</tr>
<tr>
<td class="textomensaje">
<asp:Label ID="Label1" runat="server">Aca va el texto del mensaje</asp:Label></td>
</tr>
<tr>
<td class="botoncerrarmensajero">
<telerik:RadButton runat="server" ID="RadButtonConfirmClient" CssClass="BtConfirmacion"
             CausesValidation="false" Text="OK">
<Image ImageUrl="../App_Themes/Opa.Tema/Imagenes/NegroTotal.png" IsBackgroundImage="true" />
</telerik:RadButton>
<telerik:RadButton runat="server" ID="RadButtonCancelClient" CssClass="BtConfirmacion"
             CausesValidation="false" Text="Cancelar"
                       OnClientClick="closeCustomConfirmClient();">
<Image ImageUrl="../App_Themes/Opa.Tema/Imagenes/NegroTotal.png" IsBackgroundImage="true" />
</telerik:RadButton>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</telerik:RadWindow>
</Windows>

hello I have this window in a window manager, this window is displayed from a radbutton in another location, using javascript and after asking achievement button trigger the event, the problem is that the databind have stopped working, can anyone help ?

var fireConfirm = true;
        function OnClientClicked(button, args) {
            var callBackFunction = Function.createDelegate(button, function (argument) {
                if (fireConfirm && argument) {
                    this.set_autoPostBack(true);
                    fireConfirm = false;
                    this.click();
                }
            });
            if (fireConfirm) {
                button.set_autoPostBack(false);
                var text = "¿Has revisado ya?, si es asi ¿Estas seguro de llevar a cabo esta acción?";
                var oWnd = radopen(null, 'rw_confirm_client');
                var X = document.body.clientWidth - 400;
                var Y = 150;
                oWnd.MoveTo(X, Y);
 
 
                var button = document.getElementById("<%=RadButtonConfirmClient.ClientID %>").onclick = callBackFunction;
                var text = document.getElementById("<%=Label1.ClientID %>").innerText = text;
 
 
            }
        }

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Aug 2013, 10:14 AM
Hello,

I do not see anything related to databinding in these snippets, so at this point I can only assume what is going wrong.

What I can suggest is the following:
1) examine this demo on confirming the click on a RadButton: http://demos.telerik.com/aspnet-ajax/button/examples/confirm/defaultcs.aspx.
2) take this RadWindow out of the RadWindowManager, because its ContentTemplate is used
3) if you are using AJAX make sure the necessary controls are updated after the postback because if they are not it can seem as if databinding them does not work.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
OPA
Top achievements
Rank 1
answered on 23 Aug 2013, 03:47 PM
Marin thanks for reply, i see demo but not working for me because the javascript code is in the masterpage and the control that fired the formview event is a webform and can't access "mybutton.ClientID", i can find the control but the click does anything

Note: the databind fired in item_deleted from formview, its the code:

protected void Fvcargos_ItemDeleted(object sender, FormViewDeletedEventArgs e)
{
    Grcargos.DataBind();
}


Tags
Window
Asked by
OPA
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
OPA
Top achievements
Rank 1
Share this question
or