Grid - Excel-like Filtering not work in .ascx

12 posts, 0 answers
  1. Mostafa
    Mostafa avatar
    4 posts
    Member since:
    Oct 2015

    Posted 07 Oct 2015 Link to this post

    Hi,
    RadGrid  Grid - Excel-like Filtering not work in .ascx page... but it work in .aspx.
    In .ascx page when i click on the Header Context Filter Menu button the Filter Popup is not show .... nothing is happen but in .aspx page it works well

    would you please help me so that Excel-like Filtering  is also work on a grid that is in my .aspx page 

     Here is my grid code Mostly taken from your example 

    //////////////////

    <telerik:RadGrid ID="grdBracketPlayers" Width="1120" runat="server" Skin="Metro"  
                                    AllowFilteringByColumn="true"  FilterType="HeaderContext" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowPaging="True" OnFilterCheckListItemsRequested="grdBracketPlayers_FilterCheckListItemsRequested"  AllowSorting="true" GroupingEnabled="true"
                                    OnNeedDataSource="grdBracketPlayers_NeedDataSource"> 
                                    <MasterTableView DataKeyNames="FullName" AutoGenerateColumns="False" >
                                        <Columns>
                                            
                                           <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="FullName" FilterControlAltText="Filter ContactName column" HeaderText="PlayLevelName" SortExpression="PlayLevelName" UniqueName="PlayLevelName" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith">
                            </telerik:GridBoundColumn>
                                        
                                        </Columns>
                                    </MasterTableView>
                                    
                                </telerik:RadGrid>​

  2. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 07 Oct 2015 Link to this post

    Hi,

    Thank you for contacting us.

    I tried to replicate the described problem in simple runnable project and excel-like filtering is working properly when the grid is inside .ascx page. Find attached my test page and let me know what is the difference in your case.

    Additionally, check the browser console for errors when you click context menu button. Javascript error on the page could prevent the menu from opening.

    I hope this helps.

    Regards,
    Pavlina
    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
  3. Robert
    Robert avatar
    25 posts
    Member since:
    Sep 2010

    Posted 09 Oct 2015 Link to this post

    Mostafa --

    Perhaps this is the source of your problems. This is the response I received back from Telerik with the same problem.

    From Telerik Tech Support --------------------------------------- 

    "Indeed in the described scenario excel-like filtering would not work. For the time being, you could try binding the ListBox inside the filter menu with Web Services. You could take a look at the blog post "Add Excel-like Multi-select Filtering to Your ASP.NET DataGrid" for more information about the suggested approach.

    Another option would be to create the grid declaratively as it is done in the project I sent you. Please excuse us for the inconvenience caused.

    -------------------------------------------------------------------

     So we are back to this again. I cannot believe they even bothered releasing this. It is just marketing fluff.

     

  4. Mostafa
    Mostafa avatar
    9 posts
    Member since:
    Oct 2014

    Posted 09 Oct 2015 Link to this post

    Hi Pavlina
    i try that but its not work for me.In my page i need to rebind the radgrid from server.After Rebind the grid from sever side my grid is shown but when i click on the header button for "excel-like filter" nothing is happen ... no popup is open.
    the sample project that you send to me if you rebind the grid in page prerender even then it no open the filter popup 
    Please use the same project that you send me and just add the following code in your WebUserControl.ascx.cs file .. you can easily find the problem that filter is not work 

     

    /////////////////////

     protected void Page_PreRender(object sender, EventArgs e)
        {
            RadGrid1.Rebind();
        }

  5. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 09 Oct 2015 Link to this post

    Hi,

    Note that in order to enable LoadOnDemand of the checklist you should Rebind() the grid on PageLoad. This is so because control events and RaiseCallbackEvent (ListBox method) are called before PreRender. This means that in order event to be raised and listbox to populate with data the control should be rendered on the page at this point. More information for the page lifecycle is available here:
    https://msdn.microsoft.com/en-us/library/ms178472.aspx
     
    Regards,
    Pavlina
    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
  6. Mostafa
    Mostafa avatar
    9 posts
    Member since:
    Oct 2014

    Posted 12 Oct 2015 Link to this post

    Hi Pavlina,

    well i was use Checklist Filter i mean Filter type ="CheckList" and rebind my Radgrid in Page_PreRender event and that filter works well .... but new  Excel-like Filtering is not work why i think it is a bug. if you use the same code that you sand me and change the filter type to "Checklist" Filter and rebind the grid in Page_PreRender  . then it work well you see your checklist ..... but "Excel-like Filtering" not work why .. is not it is a Bug .. because if Checklist Filter is work After Rebind the Grid In Page_PreRender  Event then Excel-like Filtering also should be work after Rebind Grid In Page_PreRender Event 
    .. not only me Most of people Rebind their Grid in Page_PreRender Event when they use MultiView...

    so please take a look on this thing and give me a solution so that i can use Excel-like Filtering after rebind the grid in Page_PreRender  Event 

  7. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 13 Oct 2015 Link to this post

    Hello,

    The behavior is different because the ListBox in the case with Excel-like filtering is placed in HeaderContextMenu which needs to be rendered earlier than the filter menu due to the other composite controls placed in it. However, I forwarded your concerns to our developers and they will do their best to unify different  filter type behavior.

    Please excuse us for the inconvenience caused.

    Regards,
    Pavlina
    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
  8. Kasim
    Kasim avatar
    22 posts
    Member since:
    Feb 2016

    Posted 19 Jun 2018 Link to this post

    I am facing the same problem with the latest version of the telerik control. The excel like filtering is working good with the ASPX page but when it goes to .ascx, it stops working. Kindly help.
  9. Mostafa
    Mostafa avatar
    4 posts
    Member since:
    Oct 2015

    Posted 20 Jun 2018 in reply to Kasim Link to this post

    In .ascx when you post back it rebind the grid so you lost your filter settings ......... i solve my problem by doing some customization in different grid event ....
  10. Kasim
    Kasim avatar
    22 posts
    Member since:
    Feb 2016

    Posted 20 Jun 2018 in reply to Mostafa Link to this post

    Which grid event you handled to workaround the issue? Could you please provide some details along with code snippet?
  11. Kasim
    Kasim avatar
    22 posts
    Member since:
    Feb 2016

    Posted 05 Aug 2018 Link to this post

    Is there no fix available for the issue till now? This is really weird.
  12. Tsvetomir
    Admin
    Tsvetomir avatar
    651 posts

    Posted 08 Aug 2018 Link to this post

    Hi Kasim,

    I've already responded to your query in the support thread about the same matter. I suggest that we continue our technical conversation on the mentioned thread.

    Kind regards,
    Tsvetomir
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top