PDA

View Full Version : [CLOSED] toggle grid filterheader



susanz
Dec 18, 2014, 12:53 AM
I have grid filter header defined as below, how do I toggle the filter header row when the toggle button is clicked?
Thanks
-szhang



@(
Html.X().GridPanel()
.Store(
X.Store()
.ID(Model.GridID)
.Model(Model.StoreModel)
.RemotePaging(false)
.PageSize(20)
.Proxy(X.AjaxProxy()
.Reader(X.JsonReader().Root("data").MessageProperty("message"))
.Url(Url.Action("LoadGridData", "Grid"))
)

.ShowWarningOnFailure(false)
.Listeners(events =>
{
events.Exception.Fn = "CPMApp.ShowStoreException";// "onStoreException";
})
.Parameters(new { gridId = Model.GridIDInt })


)// end store
.ColumnModel(Model.Columns) //define display columns
.TopBar(
X.Toolbar()
.AutoScroll(true)
.Items(
X.Button()
.Text("Toggle Filter Row")
.Icon(Icon.Film)
.Handler(??) //" this.up('grid').filterHeader.toggle()")
)//end toolbar items
)//end toolbar
.Plugins(
X.FilterHeader().ID("Filter" + Model.GridIDInt)
)

Daniil
Dec 18, 2014, 6:09 AM
Hi @susanz,

I have found two threads with different approaches.
http://forums.ext.net/showthread.php?27600
http://forums.ext.net/showthread.php?30721

susanz
Dec 18, 2014, 4:04 PM
Thanks Daniil! The 2nd one works perfectly for me.
Thanks
-szhang