PDA

View Full Version : Text Field in the header of a column



glucks
4 Sep 2012, 9:37 AM
Hi,

Is it possible to add a textfield (xtype:'textfield') to the header of a Ext.grid.Panel? Basically what I need is a 2 row column header where 1 row has the label and 1 row has a text field (order is not important). When the label is clicked the column should be sorted but when the textfield is clicked it shouldn't.

I tried the following but I'm getting this error: "headers[i].setSortState is not a function"



var grid = Ext.create('Ext.grid.Panel', {
store: store,
columns:
[{
layout: 'form',
items:[
{
xtype: 'textfield',
fieldLabel: '<b>Test Label',
name:"name_field",
width:230
}]


}
],
height: 350,
width: 600,
title: 'Names',
renderTo: 'data-table',
viewConfig: {
stripeRows: true
}

});

sword-it
4 Sep 2012, 10:28 PM
HI!

have a look on this:-
http://www.sencha.com/forum/showthre...lterBar-plugin (http://www.sencha.com/forum/showthread.php?152923-Ext.ux.grid.FilterBar-plugin)
http://www.sencha.com/forum/showthre...Header-Filters

(http://www.sencha.com/forum/showthread.php?150918-Grid-Header-Filters)Both above plugins used filter in grid header.check out the codes.

glucks
6 Sep 2012, 4:53 AM
Thank you, that is what I was looking for. I tweaked the FilterBar plugin not to do any filtering and I also changed it so that all date columns have 2 date fields, for date range

asergeychik
16 Jul 2013, 11:45 AM
Hello, glucks

Could you please share that date range filter tweak for FilterBar plugin if possible?

Thank you in advance,
Anna.