GridView Filter value on Tab change

6 posts, 0 answers
  1. gerardo
    gerardo avatar
    41 posts
    Member since:
    Dec 2014

    Posted 17 Feb Link to this post

    Good day.

    I have 3 Tabs. Each RadTabControl have a RadGridView inside. When I search/filter in RadGridView 1 inside Tab 1 then move to Tab 2 and go back to Tab 1, the search/filter on the RadGridView 1 is removed. How can I retain the filter value in RadGridView when I change Tabs.

    Also I noticed that when I go back to Tab 1 with the RadGridView 1, the filtered value was removed and a BusyIndicator is blocking the RadGridView 1 and does not disappear.

     

    Thank you.

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1258 posts

    Posted 22 Feb Link to this post

    Hello,

    For performance optimization, the ControlTemplate of the RadTabControl defines a single ContentPresenter that holds only the currently selected RadTabItem's Content. Therefore each time the selection is changed the content of the last active item is unloaded in order to load the content of the newly selected item. Since the load/unload operations involve add/remove actions in the visual tree, the content (your RadGridView instances in this case) does not keep its state.

    To keep the state of the controls inside the tab items, you can set the IsContentPreserved property of the RadTabControl to True as shown in this article:

    <telerik:RadTabControl IsContentPreserved="True" 

    Please give this a try and let me know if setting the property resolves your issue.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  3. gerardo
    gerardo avatar
    41 posts
    Member since:
    Dec 2014

    Posted 22 Feb in reply to Dilyan Traykov Link to this post

    Thank you for your reply Sir. Now that its for performance optimization I think I'll leave it false now. 

    But now what is happening is when I filtered GridView 1 in Tab 1 then go to Tab 2, and go back to Tab 1, a Busy indicator is showing covering the GridView 1 and not closing. I already tried to set isBusy property of GridView 1 to false. I also remove usage of RadBusyIndicator. 

  4. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1258 posts

    Posted 25 Feb Link to this post

    Hello,

    Would you find it possible to demonstrate this undesired behavior in a small sample project (for which you can open a new support ticket or select a storage provider of your choice) or at least share some code snippets so that I can try to replicate it at my end?

    Thank you in advance for your cooperation on the matter.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  5. gerardo
    gerardo avatar
    41 posts
    Member since:
    Dec 2014

    Posted 28 Feb in reply to Dilyan Traykov Link to this post

    Good day Sir Dilyan. Thank you for your response.

     

    I tried to create a new program to recreate the behavior and I found this GridView property.

    <Setter Property="DataLoadMode" Value="Asynchronous"/>

    This results the the behavior I am experiencing But only if I use a RadDataPager to my GridView.

     

    I have tried the following

    GridView without DataLoadMode=Asynchronous with RadDataPager - its working

    GridView with DataLoadMode=Asynchronous without RadDataPager - its working

    GridView with DataLoadMode=Asynchronous with RadDataPager - a busy indicator is displaying and not closing

  6. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1258 posts

    Posted 01 Mar Link to this post

    Hello,

    As stated in the Tips and Tricks article, using the Asynchronous DataLoadMode is no longer recommended as it may lead to potential issues, such as the one you've described.

    Could you please specify whether you actually require this property to be set and if so - what is the particular reason for this, so that I can suggest an alternative solution?

    Regards,
    Dilyan Traykov
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top