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

RadConfirm client side to server side

1 Answer 148 Views
Window
This is a migrated thread and some comments may be shown as answers.
TrialAndError
Top achievements
Rank 1
TrialAndError asked on 10 Aug 2010, 04:25 PM
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.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Aug 2010, 12:38 PM
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.
Tags
Window
Asked by
TrialAndError
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or