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

RadGrid header not visible when AllowSorting="True"

3 Answers 211 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Laurent
Top achievements
Rank 1
Laurent asked on 22 Jan 2016, 09:14 AM

Hello

I have a simple RadGrid bind on EntityDataSource,

when i pass AllowSorting="True", the header bar becomes invisible, Is he missing something?

 

<asp:EntityDataSource ID="MyData" runat="server" ConnectionString="name=AGIDE4_DEVEntities"
    OnSelecting="MyData_Selecting" OnSelected="MyData_Selected"
    DefaultContainerName="AGIDE4_DEVEntities" AutoSort="False"
    EntitySetName="CompteConnexion_Profil_Parametres" EntityTypeFilter="CompteConnexion_Profil_Parametres"
    EnableUpdate="True" EnableDelete="False" EnableInsert="False">
</asp:EntityDataSource>
 
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
 
<telerik:RadAjaxPanel runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
    <telerik:RadGrid ID="RadGrid1" runat="server" EnableHeaderContextMenu="true" DataSourceID="MyData"
        OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged"
        OnPreRender="RadGrid1_PreRender" OnColumnCreated="RadGrid1_ColumnCreated"
        OnColumnsReorder="RadGrid1_ColumnsReorder" OnEditCommand="RadGrid1_EditCommand"      
        PageSize="100" VirtualItemCount="100" ClientSettings-AllowColumnHide="false"
        AutoGenerateHierarchy="false" AutoGenerateColumns="true" AllowPaging="true"  AllowSorting="False"
        AllowFilteringByColumn="true">   
        <ClientSettings
            Virtualization-RetrievedItemsPerRequest="500"
            Virtualization-EnableCurrentPageScrollOnly="false"
            Virtualization-EnableVirtualization="false"
            Virtualization-ItemsPerView="100"
            Virtualization-InitiallyCachedItemsCount="500"
            Scrolling-EnableVirtualScrollPaging="false"
            Scrolling-AllowScroll="true"
            Scrolling-UseStaticHeaders="true"
            ReorderColumnsOnClient="true"
            AllowColumnsReorder="true"
            Selecting-AllowRowSelect="true"           
            ColumnsReorderMethod="Reorder" />
 
    </telerik:RadGrid>
 
</telerik:RadAjaxPanel>

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 26 Jan 2016, 02:11 PM
Hi Laurent,

The behavior you describe seems rather strange. I used the RadGrid code you have provided to assemble a sample project. The headers were displayed and the sorting was working as expected on my end. Check out the video below as illustration:


Would you disable AJAX by setting the EnableAJAX property of RadAjaxPanel to False and see if the behavior changes. Also, while AJAX is disabled press F12 to open the browser console and check if there are any errors listed.


Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Laurent
Top achievements
Rank 1
answered on 26 Jan 2016, 04:14 PM
 

Nothing Change.

In attache files:

one file with AllowSorting=false

and another with AllowSorting=true

 

thie is a code of my page :

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UC_RadGrid.ascx.cs"
    Inherits="Agide_4.Composants.Graphique.Grille.UC_RadGrid" %>
 
<telerik:RadPersistenceManager ID="RadPersistenceManager1" runat="server">
    <PersistenceSettings>
        <telerik:PersistenceSetting ControlID="RadGrid1" />
    </PersistenceSettings>
</telerik:RadPersistenceManager>
 
<asp:EntityDataSource ID="MyData" runat="server" ConnectionString="name=AGIDE4_DEVEntities"
    OnSelecting="MyData_Selecting" OnSelected="MyData_Selected"
    DefaultContainerName="AGIDE4_DEVEntities" AutoSort="False"
    EnableUpdate="True" EnableDelete="False" EnableInsert="False">
</asp:EntityDataSource>
 
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
 
<telerik:RadAjaxPanel  runat="server" EnableAJAX="false"  LoadingPanelID="RadAjaxLoadingPanel1">
    <telerik:RadGrid ID="RadGrid1" runat="server" EnableHeaderContextMenu="true" DataSourceID="MyData"
        OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged"
        OnPreRender="RadGrid1_PreRender" OnColumnCreated="RadGrid1_ColumnCreated"
        OnColumnsReorder="RadGrid1_ColumnsReorder" OnEditCommand="RadGrid1_EditCommand"      
        PageSize="100" VirtualItemCount="100" ClientSettings-AllowColumnHide="false"
        AutoGenerateHierarchy="false" AutoGenerateColumns="true" AllowPaging="true"  AllowSorting="False"
        AllowFilteringByColumn="true"  AllowMultiRowSelection="false" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCommand="RadGrid1_ItemCommand" >
        <MasterTableView AllowMultiColumnSorting="true">
                <PagerStyle AlwaysVisible="true" />
            </MasterTableView>
 
        <ClientSettings
            Virtualization-RetrievedItemsPerRequest="500"
            Virtualization-EnableCurrentPageScrollOnly="false"
            Virtualization-EnableVirtualization="false"
            Virtualization-ItemsPerView="100"
            Virtualization-InitiallyCachedItemsCount="500"
            Scrolling-EnableVirtualScrollPaging="false"
            Scrolling-AllowScroll="true"
            Scrolling-UseStaticHeaders="true"
            ReorderColumnsOnClient="true"
            AllowColumnsReorder="true"
            Selecting-AllowRowSelect="true"           
            ColumnsReorderMethod="Reorder"         
            />
 
    </telerik:RadGrid>
 
</telerik:RadAjaxPanel>
 
<telerik:RadButton runat="server" Visible="true" ID="SaveRadGridSetting" Text="Save grid" AutoPostBack="true" OnClick="SaveRadGridSetting_Click" />
<telerik:RadButton runat="server" ID="ExportRadGrid" Text="Export grid" AutoPostBack="true" OnClick="ExportRadGrid_Click" />

0
Viktor Tachev
Telerik team
answered on 28 Jan 2016, 01:34 PM
Hello Laurent,

I used the code you have provided and created a sample project. I used dummy data for testing.

The sample is working as expected on my end. Please download the attachment and give it a try. Let me know how it works on your end.

I would appreciate it if you describe what should be different in the sample in order to replicate the behavior you are observing.

Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Laurent
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Laurent
Top achievements
Rank 1
Share this question
or