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

radconfim and Formview

2 Answers 86 Views
Window
This is a migrated thread and some comments may be shown as answers.
mac
Top achievements
Rank 1
mac asked on 18 Aug 2008, 06:27 PM

heya.. trying to determine how to use a radcofirm popup to confirm deletion of a record from a formview.
this works fine as a standard confirm...

  •  OnClientClick="return confirm('Are you certain you want to delete this?'); "

this does not

  • OnClick="radconfirm('Are you sure?');">

return the following error: 
'radconfirm' is not a member of 'ASP.ctrls_ctrlName_ascx'.

I have used the following as a guideline http://www.telerik.com/demos/aspnet/prometheus/Window/Examples/BrowserDialogBoxes/DefaultCS.aspx

My sloppy code:
(note that the sample buttons at the bottom work fine in my page) 

    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" 
            Text="Delete"  OnClick="radconfirm('Are you sure?'); return false;"></asp:LinkButton> 
        
        <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" 
            Text="New">  
        </asp:LinkButton> 
    </ItemTemplate> 
</asp:FormView> 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Sunset">  
</telerik:RadWindowManager> 
&nbsp;  
 
                        <button style="width: 150px; margin-bottom: 3px;"  onclick = "radconfirm('Are you sure?');" class="button">show CONFIRM BOX</button><br/>  
 
thoughts are appreciated.

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 19 Aug 2008, 04:55 AM
Hi mac,

OnClick sets the server event that should be fired when the button is clicked - you should use OnClientClick instead.


All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mac
Top achievements
Rank 1
answered on 19 Aug 2008, 03:27 PM
a case of hand face monday. Don't know why I did not see that.
Tags
Window
Asked by
mac
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
mac
Top achievements
Rank 1
Share this question
or