PDA

View Full Version : How to replace header of a grid with custom form element like combo box,text field?



manish.shukla88
23 Oct 2011, 9:29 PM
Generally grid header contain string that is passed as parameter ,it may string like 'First Name' or html like '<select>...</select>'.
Is there any way to put extJs element like combo box in all column header?

I did this in following way. Pass this one as column header. '<div id="Header1"></div>'. Then create a ext Js combo box and render it with "Header1". It's working with normal grid. but header disappear when I use Ext.PagingToolbar plugin with this grid.

I have used CheckboxSelectionModel for row selection but selected row lost their selection when navigate pages.

netemp
23 Oct 2011, 10:41 PM
Is there any way to put extJs element like combo box in all column header?


Manish, could you share the reason that why are you trying to do this? If the purpose is to provide user a platform where she can enter value and filter the grid records, then for this I shall advise you to use filter plugin which will create a form element (like textbox) in the first row of the grid where user can enter values and filter the records present in the grid.

http://www.sencha.com/forum/showthread.php?147553-Ext.ux.grid.HeaderFIlter

manish.shukla88
31 Oct 2011, 12:49 AM
I just want to show extJs combobox in header nothing else like filtering or anything.