No data display with ShowHeadersWhenNoRecords="False" and GridClientDeleteColumn

10 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    885 posts
    Member since:
    Nov 2003

    Posted 09 Mar 2009 Link to this post

    Hi,

    I have a grid and it works OK.
    Then I had the idea that it would look better if I remove the headers when no data is displayed.
    The problem - when I set 

    ShowHeadersWhenNoRecords

     

    ="False"

     

    it does allways show the NoRecordsTemplate (even if data is present) - and no data is displayed.
    Data is bound to a linq datasource.

    When I remove my GridClientDeleteColumn it works like expected.
    But this column seems to break the thing.

    To reproduce - buil a simple grid, set ShowHeadersWhenNoRecords="False".
    Should work as expected.
    Add a GridClientDeleteColumn -- it displays always "No records to display"


    Regards

    Manfred
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 12 Mar 2009 Link to this post

    Hi Manfred,

    Indeed, the described behavior is observed. I have alerted our developers, and they will soon investigate the issue in greater detail.
    I hope the problem will be addressed shortly.

    Greetings,
    Yavor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. ManniAT
    ManniAT avatar
    885 posts
    Member since:
    Nov 2003

    Posted 12 Mar 2009 Link to this post

    Just because I'm curious - is the telerik-points system still active?
    I remeber in the last years customers got some if they find something - my last have been assigned in december.

    By the way - I made a simple work around for this - bind to the DataBound event of the grid and do something like this:

        protected void rgCartLines_DataBound(object sender, EventArgs e) {  
                if (rgCartLines.MasterTableView.DataKeyValues.Count <1) {  
                    rgCartLines.ShowFooter = false;  
                    rgCartLines.ShowHeader = false;  
                }  
            }  
     
    rgCartLine of course is the id of the grid :)

    Regards

    Manfred
  4. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 16 Mar 2009 Link to this post

    Hi Manfred,

    I have updated your Telerik points for your report.
    I hope the work-around you have come up meets your requirements well, while this issue is addressed.

    Kind regards,
    Yavor
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 05 Apr 2009 Link to this post

    What's the news on this issue? It's not fixed in the latest release (Q1 402).
  6. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 06 Apr 2009 Link to this post

    Hi Kenneth,

    Unfortunately, the issue is still not addressed. I hope this will be done in the next couple of weeks. I will update this thread when the problem is fixed.

    Regards,
    Yavor
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  7. Susan Hessler
    Susan Hessler avatar
    13 posts
    Member since:
    May 2006

    Posted 21 Mar 2010 Link to this post

    What's the news on this issue?  And, it also happens with the detailed tables (in my case, the detailed tables do not have a delete column).
  8. Brian
    Brian avatar
    20 posts
    Member since:
    Sep 2019

    Posted 09 Jul in reply to Susan Hessler Link to this post

    Has this been addressed yet? I have a same issue where the NoRecordsTemplate shows. There are a few things to point out here. Its not really the template that is the issue, it seems its the logic behind showing "NoDetailRecordsText" and "NoMasterRecordsText" for the grid.

    If i set both properties ie:  NoDetailRecordsText="No details" NoMasterRecordsText="No master" and using NeedDataSource for my binding and GroupExpressions. This is the oddity, the "NoMasterRecords" and "NoDetailRecordsText" DO NOT show when i have data, which is good. I can not see it at the bottom of the data. However, if i use the collapse arrow on the Group, it appears at the bottom of the collapsed Group. Once I open it back up, it is there now at the bottom. This is all Client side, no postbacks. The NoRecordsTemplate works the same way. I see if AFTER i open back up the collapse. No scrolls, i have this at 100% height

     

    <telerik:RadGrid runat="server" ID="RadGridAttendees" ShowHeader="true" ShowFooter="True" AutoGenerateColumns="false"
                                            EnableGroupsExpandAll="true" AllowSorting="true" AllowAutomaticUpdates="true" RenderMode="Lightweight">
     
    <ExportSettings OpenInNewWindow="true" IgnorePaging="true" ExportOnlyData="true" FileName="Event Attendees" UseItemStyles="false">
                                                <Csv ColumnDelimiter="Comma" FileExtension=".csv" RowDelimiter="NewLine" />
                                                <Pdf PageBottomMargin="6.35" PageTopMargin="6.35" PageLeftMargin="6.35" PageRightMargin="6.35" ForceTextWrap="false" DefaultFontFamily="Arial Unicode MS" />
                                            </ExportSettings>
                                            <HeaderContextMenu EnableTheming="True">
                                                <CollapseAnimation Duration="400" Type="OutCubic" />
                                            </HeaderContextMenu>
                                            <ClientSettings AllowExpandCollapse="true" AllowGroupExpandCollapse="true" EnableAlternatingItems="false">
                                                <Selecting CellSelectionMode="SingleCell" />
                                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                                <ClientEvents OnHeaderMenuShowing="OnHeaderMenuShowing" OnCellSelected="OnCellSelected" OnBatchEditOpening="OnBatchEditOpening" OnBatchEditCellValueChanging="OnBatchEditCellValueChanging" OnGroupExpanded="ExpandResize" OnHierarchyExpanded="ExpandResize" />
                                            </ClientSettings>
     
                                            <GroupingSettings RetainGroupFootersVisibility="true" GroupByFieldsSeparator="" CaseSensitive="false" />
     
                                            <MasterTableView runat="server" DataKeyNames="FamilyId, MemberId, EventNoteId, GroupName, NotAttending, Attending, IsPrimary, IsParent, IsChild, Questions" AllowSorting="true" EnableHeaderContextMenu="true" CommandItemDisplay="Top" GroupLoadMode="Client"
                                                ShowGroupFooter="true" ClientDataKeyNames="FamilyId, MemberId, EventNoteId, EventMasterId, EventSubId, GroupName"
                                                EditMode="Batch" NoDetailRecordsText="No details" NoMasterRecordsText="No master">                                           
     
                                                <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowExportToPdfButton="true" ShowExportToWordButton="true"
                                                    SaveChangesText="Save Event Notes Changes" CancelChangesText="Cancel Event Note Changes" ShowRefreshButton="false" />
     
                                                <BatchEditingSettings EditType="Cell" />
                                                 
                                                <GroupByExpressions>
                                                    <telerik:GridGroupByExpression>
                                                        <GroupByFields>
                                                            <telerik:GridGroupByField FieldName="EventSubId" />
                                                            <telerik:GridGroupByField FieldName="GroupLevel" />
                                                        </GroupByFields>
                                                        <SelectFields>
                                                            <telerik:GridGroupByField FieldName="EventSubName" HeaderText=" " HeaderValueSeparator=" " />
                                                            <telerik:GridGroupByField FieldName="GroupName" HeaderText=" for Tribe: " HeaderValueSeparator=" " />
                                                        </SelectFields>
                                                    </telerik:GridGroupByExpression>
                                                </GroupByExpressions>
     
                                                 
     
                                                <Columns>

     

     

     

  9. Brian
    Brian avatar
    20 posts
    Member since:
    Sep 2019

    Posted 09 Jul Link to this post

    I would also like to note that i had to put code in the "NeedDataSource" event to get back a record count to use the NoRecordsTemplate correctly. If the DataSource came back empty, then i would enable the EnableNoRecordsTemplate property, if i have records in the DataSource, then disable EnableNoRecordsTemplate. Again, this was done all on the server side using the NeedDataSource. This should not be needed, as the Grid should know if it has records or not. Correct?
  10. Attila Antal
    Admin
    Attila Antal avatar
    547 posts

    Posted 14 Jul Link to this post

    Hi Brian,

    Due to the low demand, this issue has not been prioritized yet.

    In the markup you shared columns and detail tables are not visible. Can please share the entire markup including the columns and detail tables so that I can see the complete structure? I need that information to be able to replicate the problem locally and then I can start debugging it.

    Kind regards,
    Attila Antal
    Progress Telerik

Back to Top