I have RadListBox1 and RadListBox2. They are parked in a RadPageView attached to a RadTab. Either listbox can transfer (move) items from one to the other with the transfer button, 2x-click, or drag-n-drop. Everything is cool. I have a "Save" button, the purpose of which is to update RadListBox2's database table. On button_click I am grabbing the items in RadListBox2 as a collection, parsing the collection, and transforming into a comma-delimited string all on the client in order to pass through RadAjaxManager1_AjaxRequest:
I have confirmed through JavaScript alerts that all is well here. BUT - ajaxMgr.ajaxRequest( arg ) doesn't fire its associated method in the code-behind. RadScriptManager is set:
I have Ajax turned on in Page_Load:
I have AutoPostBackOnTransfer turned off on both listboxes because nothing works when switched on:
And the code-behind method looks fine to me:
But my sanity checks are never invoked.
Got any clues, guys?
Cheers!
Mark
function btnClick() { |
var list = $find("<%= radListBox2.ClientID %>"); |
var lstNames = list.get_items(); |
var arg; |
if( lstNames.get_count() == 0 ) { |
if (confirm("blah, blah, blah.\n\nProceed?")) { |
arg = 0; |
} else { return 0; } |
} else { |
arg = lstNames.get_count() + ","; |
lstNames.forEach( function( item ) { arg = arg + item.get_text() + ","; }); |
arg = arg.substr( 0, arg.length - 1 ); |
} |
var ajaxMgr = $find("<%= RadAjaxManager1.ClientID %>"); |
ajaxMgr.ajaxRequest( arg ); |
} |
I have confirmed through JavaScript alerts that all is well here. BUT - ajaxMgr.ajaxRequest( arg ) doesn't fire its associated method in the code-behind. RadScriptManager is set:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> |
I have Ajax turned on in Page_Load:
RadAjaxManager.GetCurrent( Me ).EnableAJAX = True |
I have AutoPostBackOnTransfer turned off on both listboxes because nothing works when switched on:
radListBox1.AutoPostBackOnTransfer = False |
radListBox2.AutoPostBackOnTransfer = False |
And the code-behind method looks fine to me:
Protected Sub RadAjaxManager1_AjaxRequest( sender As Object, e As AjaxRequestEventArgs ) Handles RadAjaxManager1.AjaxRequest |
Dim str_Array As String() = Split( e.Argument, "," ) |
Dim numRecords = Integer.Parse( str_Array( 0 )) |
Dim lst_Tables As IList( Of String ) = New List( Of String ) |
Dim p_data As String = String.Empty |
If numRecords > 0 And numRecords < 10 Then |
p_data = e.Argument.Substring( 2 ) |
ElseIf numRecords > 9 And numRecords < 100 Then |
p_data = e.Argument.Substring( 3 ) |
Else |
p_data = e.Argument.Substring( 4 ) |
End If |
' sanity check |
RadAjaxManager1.Alert( "numRecords = " & numRecords ) |
RadAjaxManager1.Alert( "p_data = " & p_data) |
* * * |
End Sub |
But my sanity checks are never invoked.
Got any clues, guys?
Cheers!
Mark