No records to display. message with GroupByExpressions

7 posts, 0 answers
  1. Venkatesh
    Venkatesh avatar
    21 posts
    Member since:
    Jul 2014

    Posted 11 Sep 2014 Link to this post

    Hi,

    I have a rad grid with GroupByExpressions and GroupLoadMode="Client". By default all the groups are expanded, the problem is if i collapse and expand the last group i am getting a message "No records to display." in the bottom of the last group. If i change GroupLoadMode from client to server that message is not coming. That message should come when there is no data in the radgrid datasource, but how its comming in grouping. Can anyone can help on this.


    Group1
             text1     1     2    3   4   5
             text2     6     7    7   9   0
    Group2
             text1      3    5    7   8   9
             text2      5    7    5   5   8
          No records to display.



    Regards,
    Venkatesh.
  2. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 15 Sep 2014 Link to this post

    Hi Venkatesh,

    I tried to reproduce the described issue but to no avail. I am sending you a simple example, please check it out and let me know what differs in your case.
    Also could you please confirm that you use the latest version of the controls?

    Looking forward for your reply.

    Regards,
    Radoslav
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Venkatesh
    Venkatesh avatar
    21 posts
    Member since:
    Jul 2014

    Posted 23 Sep 2014 Link to this post

    Hi Radoslav,

    I am using .Net Framework 3.5 compatible controls. I solved this issue by disabling rgNoRecords and hiding radgrid if there is no data.

    Regards,
    Venkatesh.
  4. Shaleen
    Shaleen avatar
    3 posts
    Member since:
    May 2017

    Posted 06 Jun Link to this post

    I am also having similar issue. I am using Telerik 2016.2.607.45. I do get this message.

     

     

     

     

  5. Shaleen
    Shaleen avatar
    3 posts
    Member since:
    May 2017

    Posted 06 Jun in reply to Shaleen Link to this post

    Your example also i have gone through but its a pretty basic one. This is my sample aspx page. Please suggest if i need to make any change.

     

    <%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="GridControl.About" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AutoGenerateColumns="False" AllowSorting="True" Height="600px" Width="1500px" RenderMode="Classic"
            ShowGroupPanel="False" EnableLinqExpressions="False"
            OnNeedDataSource="RadGrid1_OnNeedDataSource" OnBatchEditCommand="RadGrid1_OnBatchEditCommand" OnPreRender="RadGrid1_OnPreRender" >
            <MasterTableView GroupLoadMode="Client" AllowPaging="False" EditMode="Batch" GroupsDefaultExpanded="False" AllowNaturalSort="False" AllowFilteringByColumn="True"
                             AllowMultiColumnSorting="True" AllowSorting="True" PageSize="20" CommandItemDisplay="Top" ShowGroupFooter="True" ShowHeader="True" >
                <BatchEditingSettings EditType="Row" />
                <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" />
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Name" DataField="ContainerName" UniqueName="ContainerName" />
                    <telerik:GridBoundColumn HeaderText="StandardItemNo" DataField="StandardItemNo" UniqueName="StandardItemNo" />
                    <telerik:GridBoundColumn  HeaderText="LineNo" DataField="LineNo" UniqueName="LineNo" />
                    <telerik:GridBoundColumn  HeaderText="Description" DataField="Description" UniqueName="Description" />
                    <telerik:GridBoundColumn  HeaderText="AccountingCode" DataField="AccountingCode" UniqueName="AccountingCode" />
                    <telerik:GridBoundColumn HeaderText="UnitPrice" DataField="UnitPrice" UniqueName="UnitPrice" />
                    <telerik:GridBoundColumn  HeaderText="Quantity" DataField="Quantity" UniqueName="Quantity" />
                    <telerik:GridBoundColumn  HeaderText="Amount" DataField="Amount" UniqueName="Amount" Aggregate="Sum" />
                     
                </Columns>
            </MasterTableView>
            <ClientSettings AllowGroupExpandCollapse="True">
                <ClientEvents OnBatchEditOpening="BatchEditOpening" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
             
        </telerik:RadGrid>
     
        <asp:Label ID="Label1" runat="server" EnableViewState="false"></asp:Label>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
     
        function BatchEditOpening(sender, args) {
            if (args.get_columnUniqueName() === "ContainerName" || args.get_columnUniqueName() === "LineNo" || args.get_columnUniqueName() === "AccountingCode" ||
                args.get_columnUniqueName() === "Amount" || args.get_columnUniqueName() === "StandardItemNo") {
                args.set_cancel(true);
            }
        }
       
    </script>
            </telerik:RadCodeBlock>
    </asp:Content>
  6. Shaleen
    Shaleen avatar
    3 posts
    Member since:
    May 2017

    Posted 06 Jun in reply to Shaleen Link to this post

    I have gone through the example which was attached in your Post earlier but it is pretty basic one. Please find my aspx page below and suggest if there needs to be changes there or not.

    <%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="GridControl.About" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AutoGenerateColumns="False" AllowSorting="True" Height="600px" Width="1500px" RenderMode="Classic"
            ShowGroupPanel="False" EnableLinqExpressions="False"
            OnNeedDataSource="RadGrid1_OnNeedDataSource" OnBatchEditCommand="RadGrid1_OnBatchEditCommand" OnPreRender="RadGrid1_OnPreRender" >
            <MasterTableView GroupLoadMode="Client" AllowPaging="False" EditMode="Batch" GroupsDefaultExpanded="False" AllowNaturalSort="False" AllowFilteringByColumn="True"
                             AllowMultiColumnSorting="True" AllowSorting="True" PageSize="20" CommandItemDisplay="Top" ShowGroupFooter="True" ShowHeader="True" >
                <BatchEditingSettings EditType="Row" />
                <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" />
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Name" DataField="ContainerName" UniqueName="ContainerName" />
                    <telerik:GridBoundColumn HeaderText="StandardItemNo" DataField="StandardItemNo" UniqueName="StandardItemNo" />
                    <telerik:GridBoundColumn  HeaderText="LineNo" DataField="LineNo" UniqueName="LineNo" />
                    <telerik:GridBoundColumn  HeaderText="Description" DataField="Description" UniqueName="Description" />
                    <telerik:GridBoundColumn  HeaderText="AccountingCode" DataField="AccountingCode" UniqueName="AccountingCode" />
                    <telerik:GridBoundColumn HeaderText="UnitPrice" DataField="UnitPrice" UniqueName="UnitPrice" />
                    <telerik:GridBoundColumn  HeaderText="Quantity" DataField="Quantity" UniqueName="Quantity" />
                    <telerik:GridBoundColumn  HeaderText="Amount" DataField="Amount" UniqueName="Amount" Aggregate="Sum" />
                     
                </Columns>
            </MasterTableView>
            <ClientSettings AllowGroupExpandCollapse="True">
                <ClientEvents OnBatchEditOpening="BatchEditOpening" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
             
        </telerik:RadGrid>
     
        <asp:Label ID="Label1" runat="server" EnableViewState="false"></asp:Label>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
     
        function BatchEditOpening(sender, args) {
            if (args.get_columnUniqueName() === "ContainerName" || args.get_columnUniqueName() === "LineNo" || args.get_columnUniqueName() === "AccountingCode" ||
                args.get_columnUniqueName() === "Amount" || args.get_columnUniqueName() === "StandardItemNo") {
                args.set_cancel(true);
            }
        }
       
    </script>
            </telerik:RadCodeBlock>
    </asp:Content>
  7. Vessy
    Admin
    Vessy avatar
    1601 posts

    Posted 08 Jun Link to this post

    Hi Shaleen,

    Ss the provided configuration does not contain GroupByExpression logic like in the original post in this thread, can you please elaborate on the exact steps that are leading to the "No records.. " message in your applciation?

    I am attaching my test project to this reply - are you reproducing the problem with it and how?

    Regards,
    Vessy
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top