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

Can't rebind RadGrid with Rebind()

1 Answer 50 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Leo
Top achievements
Rank 2
Leo asked on 25 Jun 2013, 12:48 PM
Hi,

I'm having a problem with the Rebind() function in VB to clear the search content. Everytime I tried to step through the code, it showed that VB did run through the Rebind() function but returned nothing. Here's my code:

In HTML:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PickCarrierRG" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</telerik:RadAjaxManager>


In Javascript:

function clearsearchvalues(fromRWyesno)

document.getElementById(
"<%= HiddenTB_SearchPartyID.ClientID %>").value = "0";
document.getElementById("<%= HiddenTB_SearchFree.ClientID %>").value = "0";
 
document.getElementById("<%= HiddenTB_SearchRadius.ClientID %>").value = "0";
document.getElementById("<%= HiddenTB_SearchCityID.ClientID %>").value = "0";
var PickCarrierRSB = $find("<%= PickCarrierRSB.ClientID %>");
PickCarrierRSB.clear();
var CityRCB = $find("<%=CityRCB.ClientID%>");
CityRCB.get_items().clear();
CityRCB.set_value("");
CityRCB.set_text("");

if
( fromRWyesno == "yes" ) {
 
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("rebindPickCarrierRG");
 
}
 
}
 
function onJobRWClose() {

document.getElementById(
"<%= HiddenTB_HistoryID.ClientID %>").value = "0";
clearsearchvalues("yes");
 
}

In VB:

Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
Dim myArg As String = e.Argument
Dim myAction As String = CustGenClass.f_Split_ByComma(myArg, 1)
Dim my1st As String = CustGenClass.f_Split_ByComma(myArg, 2)
Dim myPartyID As String = Me.HiddenTB_PartyID.Text
If myArg = "rebindPickCarrierRG" Then
PickCarrierRG.Rebind()
End If
End Sub


Like I said, I tried to step through the code thoroughly but couldn't find anything. I'm still learning all this so any help would be greatly appreciated. Thank you!

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 27 Jun 2013, 01:00 PM
Hello,

I reviewed the provided code but was not able to isolate anything obvious that may cause the problematic behavior. I tried to replicate the issue in an isolated sample on my side but to no avail. Could you please elaborate a bit more on what you exactly mean by "the RadGrid does not rebind"? Does the NeedDataSource event of the RadGrid fires correctly? If the issue is that the event is not hit please ensure that you have the RadGrid View State enabled. Sharing your RadGrid declaration will help us further research on the problem and do our best to isolate the root cause of the issue.

Regards,
Maria Ilieva
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.
Tags
Ajax
Asked by
Leo
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Share this question
or