Hi,
Let's consider the following markup:
And a bit of code-behind:
The grid has two columns. The only difference between them is that one of them has a textual header, the other one - a graphical header. But the columns, when clicked to sort, behave differently:
- the textual one (colTextual): on the client side calls the requestStart handler (displays the alert); on the server side the Ajax manager reports being inside an Ajax request (isAjax == true)
- the graphical column (colGraphical): doesn't call the client side handler; the Ajax manager reports that it is not inside an Ajax request (isAjax == false)
The interesting thing is that the loading panel is displayed in both cases.
What should I do to make colGraphical column to behave in the same way as colTextual?
Regards
Tomasz
PS. I'm using Q1 2010 version of RadControls for ASP.NET AJAX.
Let's consider the following markup:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> <ClientEvents OnRequestStart="requestStart" /> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <div> <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource" OnSortCommand="RadGrid1_SortCommand"> <MasterTableView> <Columns> <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" UniqueName="colTextual" /> <telerik:GridBoundColumn DataField="Name" HeaderImageUrl="Images/someImage.gif" SortExpression="Name" UniqueName="colGraphical" /> </Columns> </MasterTableView> </telerik:RadGrid> </div> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"> </telerik:RadAjaxLoadingPanel> <telerik:RadCodeBlock ID="codeBlock1" runat="server"> <script type="text/javascript"> function requestStart(sender, eventArgs) { alert("requestStart"); } </script> </telerik:RadCodeBlock> And a bit of code-behind:
protected void RadGrid1_SortCommand(object source, Telerik.Web.UI.GridSortCommandEventArgs e) { RadAjaxManager m = RadAjaxManager.GetCurrent(Page); bool inAjax = m == null ? false : m.IsAjaxRequest; } The grid has two columns. The only difference between them is that one of them has a textual header, the other one - a graphical header. But the columns, when clicked to sort, behave differently:
- the textual one (colTextual): on the client side calls the requestStart handler (displays the alert); on the server side the Ajax manager reports being inside an Ajax request (isAjax == true)
- the graphical column (colGraphical): doesn't call the client side handler; the Ajax manager reports that it is not inside an Ajax request (isAjax == false)
The interesting thing is that the loading panel is displayed in both cases.
What should I do to make colGraphical column to behave in the same way as colTextual?
Regards
Tomasz
PS. I'm using Q1 2010 version of RadControls for ASP.NET AJAX.