View Full Version : Hiding row in the grid

15 Sep 2014, 7:52 AM
In 3.4,I have a store with one of the data items as follows:

newFacRecord = new Ext.data.Record.create([......{name:'isdeleted', mapping: 'isDeleted', type: 'string',defaultValue:'0'}])During the load ,the store filters 'live' records:

listeners: {load: function(store) { store.clearFilter(true); store.filter('isdeleted','0');...}The model for the grid contains a 'delete' link for each row:

var colModel = new Ext.grid.ColumnModel({ columns: [ ..... {width: 60, dataIndex:'showDelete', renderer:this.delLinkRenderer}} ]On clicking the link,it simply set the 'isdeleted' attribute of the record to '1'.
Note that the store is not being saved at the server yet.
But how do cause the store to re-filter,so that the above record 'hides' from the grid.

15 Sep 2014, 8:15 PM
Hay try the following for hide the row in grid based on any value
private void GridView_RowDataBound(Object sender, GridViewRowEventArgs e)
if (e.Row.Cells[2].Text == "")
e.Row.Visible = false;

16 Sep 2014, 2:51 AM
if you really don't want to remove the record from the local store via Ext.Store.remove, you may can just hide the row via css using the getRowClass config:

viewConfig: { getRowClass: function(record, rowIndex, rp, ds){ return (record.isDeleted ? "deleted-row" : ""); }},Of course you need some additional CSS then

deleted-row { visibility: hidden;}