| <script language="javascript"> |
| //the purpose of this script is to suppress the Exit confirmation message in IE |
| //for the sort links. problem appears in IE only. appears in footer so that it |
| //will execute again when a postback occurs in the grid |
| var links = document.getElementsByTagName("a"); |
| alert("found links"); |
| for (var i=(links.length-1); i>=0; i--) |
| { |
| if (links[i].getAttribute("title") == "Click here to sort") |
| { |
| alert("found a sort button"); |
| var cmd = links[i].getAttribute("href").replace("javascript:", ""); |
| links[i].onclick = function () { |
| suppressConfirmation(); |
| eval(cmd); |
| return false; |
| } |
| } |
| } |
| </script> |
An unhandled exception was generated during |
| Me.RadToolBar1.Items(1).Attributes.Add("onclick", "if(!confirm('Are you sure you want to delete this item?')) return false;") |
$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.