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

IsFilterItemExpanded

2 Answers 157 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 27 Jan 2010, 02:23 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetoslav
Telerik team
answered on 29 Jan 2010, 06:28 AM
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.
0
Christian
Top achievements
Rank 1
answered on 29 Jan 2010, 07:42 AM
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 
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Christian
Top achievements
Rank 1
Share this question
or