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

Issues with ajax and grid after upgrading to most recent version

1 Answer 40 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Joshua Gates
Top achievements
Rank 1
Joshua Gates asked on 21 Apr 2009, 07:41 PM
We are in the process of converting our whole application away from the older RadControls to the new ASP.NET Ajax versions.
On one of our pages we have allows the user to type into a textbox and the radgrid will rebinded with the results of a search query based on what was typed in box.

after i upgrade the radgrid i have been unable to get this functionality to work.
This is a content page of our master page as well.

here are snippets of what i have so far. 

<

 

telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

 

 

 

<script type="text/javascript" language="javascript">

 

 

 

function RefreshGrid() {

 

 

 

$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("Rebind");

 

}

 

 

</script>

 

 

 

</telerik:RadScriptBlock>

that is the javascript that does the post backs.

here is the code for the textbox 

 

 

 

txtOrgName.Attributes.Add("onkeyup", "RefreshGrid()");

now i also have this in the page load event

 

 

 

RadAjaxManager ajaxManger = RadAjaxManager.GetCurrent(Page);

 

 

 

if (ajaxManger != null)

 

{

 

 

RadAjaxManager.GetCurrent(Page).AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(ViewCRMRecords_AjaxRequest);

 

}

and here is the code that gets called from the javascript.

 

 

 

protected void ViewCRMRecords_AjaxRequest(object sender, AjaxRequestEventArgs e)

 

{

 

 

switch (e.Argument)

 

{

 

 

case "Rebind":

 

 

 

GridQuickCRMResults.MasterTableView.Rebind();

 

 

 

break;

 

}

}

now..if i put a breakpoint into the code at the line:

 

 

 

GridQuickCRMResults.MasterTableView.Rebind();

everytime i type into the text box...that line does get hit in code...i also traced it all the way through the needdatasource and it all works fine...i get results etc...
however nothing gets displayed on the grid...

 

 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 27 Apr 2009, 07:10 AM
Hi Joshua,

I reviewed the code, and it looks correct. Based on this information, however, it is hard to determine what is causing the unwanted behavior. To trace the issue further, please open a formal support ticket, and send us a small working project, demonstrating your setup, along with the unwanted behavior. We will review it locally, and advise you further.

Sincerely yours,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Joshua Gates
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or