I have a search textbox and button on page. Grid is also on same page. I need to refresh it everytime user clicks on serach button. Thing is I am only retriving 20 rows at a time and using VirtualItemCount to page thru others. On dgUsers_ItemDataBound I have to use Class objects and get some values to assign to hypUserId. Ajax doesn't work when I create a new instance of class. It doesn't refresh when I remove alert('hi') and when it works without alert and class, it doesn't always refreshes grid. What I am doing wrong?
Pls. help..
This is the code I am using on button click.
$find(
"<%=AjaxManager.ClientID%>").ajaxRequest("SEARCH");
alert('hi');
Ajax manager settings -
<
telerik:RadAjaxManager ID="AjaxManager" runat="server" OnAjaxRequest="AjaxManager_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="AjaxManager">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="panel" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="btnSearch">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="panel" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
And this is the grid.
<
asp:PlaceHolder id="panel" runat="server">
<telerik:RadGrid ID="dgUsers" runat="server" AllowCustomPaging="true" AllowMultiRowSelection="false"AllowPaging="True" AllowSorting="false" AutoGenerateColumns="false" OnItemDataBound="dgUsers_ItemDataBound"
OnNeedDataSource="dgUsers_NeedDataSource" OnPageIndexChanged="dgUsers_PageIndexChanged" PageSize="20" Visible="false">
<PagerStyle mode="NumericPages" AlwaysVisible="true" />
<MasterTableView><Columns>
<telerik:GridTemplateColumn HeaderText="User ID" UniqueName="PersonId">
<ItemTemplate >
<asp:HyperLink ID="hypUserId" runat="server"></asp:HyperLink>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Email" UniqueName="email">
<ItemTemplate>
<asp:Label ID="lblEmail" runat="server"></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:radgrid>
</asp:PlaceHolder>
thanks.
