RadConfirm client side to server side

2 posts, 0 answers
  1. TrialAndError
    TrialAndError avatar
    1 posts
    Member since:
    Aug 2010

    Posted 10 Aug 2010 Link to this post

    hello,

    I have stuck... when i using radconfirm passing value 'true' or 'false'...

    ex.
    i have :
    1. RadGridView 'RadGrid1' with data source available.
    2. Button 'DeleteBtn'.

    when 'DeleteBtn' clicked :
    Dim _JS As String = "radconfirm('Selected : (" & RadGrid1.SelectedItems.Count.ToString & ") item Are you sure delete ?', CallBackDelete, 330, 100, null, 'Delete');"
     
    If Not (_JS Is "") Then
    ScriptManager.RegisterClientScriptBlock(Me.Page, Me.[GetType](), e.Item.Text.ToString & "_JScript", _JS, True)
    End If

    then, at _Default.aspx javascript :
    function CallBackDelete(arg) {
       radalert('choose : ' + arg.toString());
    }

    all function above is running normaly, 

    But, i want run my module named as 'BLL' function create with VB .NET script with reference by CallBackDelete 'true' or 'false'...i'm stuck on here problem how? from javascript access VB .NET function ?
    if there is no method get passing radconfirm true, or false in vb.net for radconfirm other than using the javascript for radconfirm?

    thanks.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Aug 2010 Link to this post

    Hello,


    I have tried another method to show radconfirm on deleting a row in grid.

    I attached OnCommand client event to RadGrid and cancel the event. Call the RadConfirm explicitly (you can set the confirm text here after getting the selected items count from client), if this returns true, then call the delete function using fireCommand method.

    Here you can find relevant code.
    GridButtonColumn, RadWindow and ConfirmText


    Thanks,
    Princy.
Back to Top