IsFilterItemExpanded

3 posts, 1 answers
  1. Christian Pardun
    Christian Pardun avatar
    112 posts
    Member since:
    May 2010

    Posted 27 Jan 2010 Link to this post

    Hi Telerik-Team,

    I want to use the property   "IsFilterItemExpanded" on a radgrid. So by default the filter bar isn't show. My plan is to add an button to the grid for showing the filterbar by clicking this button.

    Is this possible and on the other side how?

    I can't find any help in the CHM for the rad grid, if I search for IsFilterItemExpanded"

    Thanks for help.

    Regards
  2. Answer
    Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 29 Jan 2010 Link to this post

    Hello Uwe,

    You can attach a client handler to the buttons' OnClientClick event and use the showFilterItem()/hideFilterItem() client api of the client GridTableView object:

    function showHideFilterRow()
    {           
     
        var grid = $find("<%=RadGrid1.ClientID %>");
        if (grid.get_masterTableView().get_isFilterItemVisible())
        {
            grid.get_masterTableView().hideFilterItem();
        }
        else
        {
            grid.get_masterTableView().showFilterItem();
        }

    }

    I hope this information helps. If you need further assistance, do let us know.

    Regards,
    Tsvetoslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Christian Pardun
    Christian Pardun avatar
    112 posts
    Member since:
    May 2010

    Posted 29 Jan 2010 Link to this post

    Dear Tsvetoslav,

    first off all thanks for your help.

    Your hint was great and do what I exprect. Thanks.

    A small addition:
    You must call this function (I put it this in an one javafunction, because I need it more than once).

     function fnRefreshGrid(GridObj) {  
                if (GridObj != null) {  
                    GridObj.get_masterTableView().rebind();  
                    GridObj.repaint();  
                }  
                  
                return false;  
            } 

    Otherwise the height of the modifiered grid will not be resize if you hide the filter item again. :-) This could be, if all height values are defined in percent!!

    Reagards 
Back to Top