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

Grid Clients events don't work correct with some cusom setting

1 Answer 20 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Aleksandr asked on 01 Oct 2012, 12:51 PM
 I got some trouble during learning of  product.
It looks like Telerik provide huge flexibility on client side but I got (I think base issues) thanks I can’t resolve with out your help.
1. Update panel is not show at all, in grid status status bar,
2. Filer grid doesn’t work from JS part (in your examples it does)
3. OnDataBundel doesn’t call on page size changes. And images is not show.

Could you please help me thank. 

Looking forward to get answer from you

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Bekey.layouts.BeKey.Test" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2012.2.912.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<head runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript" src="../../assets/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript">
        function page_init() {
            $('.show_tip').hover(function () {
            }, function () {
        function IsBundle(item) {
            var fieldName = "type";
            var value = item[fieldName];
            return value.toLowerCase() != "Address".toLowerCase();
        function RowDataBound(sender, args) {
            var imageurl;
            if (!IsBundle(args.get_dataItem())) {
                imageurl = "/assets/images/address_icon.png";
            } else {
                imageurl = "/assets/images/bundle_icon.png";
            $(args.get_item().findElement("AccessTypeImage")).attr("src", imageurl);
        function AccessRowDeleting(sender, eventArgs) {
            var item = eventArgs.get_gridDataItem().get_dataItem();
            var isBundle = IsBundle(item);
            var paramData = JSON.stringify({ "access": item, "isBondle": isBundle });
                type: "POST",
                url: "/services/netkey.svc/DeleteAccess",
                contentType: "application/json",
                data: paramData,
                success: function (result) {
                error: function (xhr) {
                    // console(xhr);
        function RequestStart(sender, eventArgs) {
            alert('Request start initiated by: ' + eventArgs.get_eventTarget());
        function ResponseEnd() {
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadLoadingPanel">
                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
                    <telerik:RadAjaxLoadingPanel runat="server" ID="RadLoadingPanel" Skin="Default" InitialDelayTime="0"
                        MinDisplayTime="1000" Transparency="25">
                        <div style="background-color: #000000; width: 100%; height: 100%">
                            <img id="imgLoader" src="/assets/images/ajax_loader.gif" />
                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" AllowPaging="True"
                        AllowFilteringByColumn="True" AutoGenerateColumns="False" ShowStatusBar="true"
                        CellSpacing="0" GridLines="None">
                                <telerik:GridImageColumn UniqueName="AccessTypeImage" DataAlternateTextField="type">
                                        <telerik:RadComboBox runat="server" DataTextField="Value" DataValueField="Key" ID="cmbTypeFilter"
                                                <telerik:RadComboBoxItem Text="All" />
                                                <telerik:RadComboBoxItem Text="Address" />
                                                <telerik:RadComboBoxItem Text="Bundle" />
                                        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                            <script type="text/javascript">
                                                function TypeSelectedIndexChanged(sender, args) {
                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                    var item = args.get_item();
                                                    var equalFilter = Telerik.Web.UI.GridFilterFunction.EqualTo;
                                                    var noFilter = Telerik.Web.UI.GridFilterFunction.NoFilter;
                                                    tableView.filter("type", item.get_text(), item.get_text() != "All" ? equalFilter : noFilter);
                                <telerik:GridBoundColumn DataField="zipCode" HeaderText="ZIP OR BUNDLE NAME">
                                <telerik:GridBoundColumn DataField="roadName" HeaderText="ADDRESS">
                                <telerik:GridBoundColumn DataField="addressType" HeaderText="TYPE">
                                <telerik:GridBoundColumn DataField="fromDatetime" HeaderText="FROM" DataFormatString="{0:MM/dd/yyyy}"
                                    ReadOnly="True" SortExpression="Dates">
                                <telerik:GridBoundColumn DataField="toDatetime" DataFormatString="{0:MM/dd/yyyy}"
                                    ReadOnly="True" HeaderText="TO">
                                <telerik:GridBoundColumn DataField="userName" HeaderText="USER">
                                <telerik:GridClientDeleteColumn ConfirmTextFields="USER" ConfirmDialogType="Classic"
                                    ConfirmTextFormatString="Are you sure to delete {0}?" HeaderStyle-Width="35px"
                                    ButtonType="ImageButton" ImageUrl="/assets/images/close_del.png" DataTextField="userName"
                                    FilterControlAltText="Filter colDelete column" UniqueName="colDelete">
                                    <HeaderStyle Width="35px"></HeaderStyle>
                            <PagerStyle AlwaysVisible="True"></PagerStyle>
                        <ClientSettings ReorderColumnsOnClient="True">
                            <ClientEvents OnRowDataBound="RowDataBound" OnRowDeleting="AccessRowDeleting" />
                            <DataBinding SelectMethod="GetAccessData" Location="/services/my.svc" SortParameterType="Linq"
                                FilterParameterType="Linq" >

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 04 Oct 2012, 10:54 AM

Could you post your code-behind file content, this will help me better understand your scenario.

StatusBar in RadGrid is used only to show the current Ajax request that is performed, it does not show any additional information. The status bar is located in the left-most part of the pager item.

About the filtering problem, could you check whether there is a JavaScript error on the page. If there is a JS error on the page, then no client-side functionality will work.

About your third question, most probably the issue comes from some databinding errors, that is why I need to take a look at your code-behind file.

the Telerik team
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 their blog feed now.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question