PDA

View Full Version : how to customize the head container for the grid component



leilei_2014
11 Nov 2014, 1:26 AM
Hello,
I am new to extjs. Now I need to customize the head container for grid component. For example, add a checkbox in the header container. I read the source code of grid component but it seems that It is very hard to grasp the core code of it. even i can't find the code where the header container is generated for grid.

Can anyone give me some suggestions or point out the right direction of studying extjs?

Thanks in advance.

joel.watson
12 Nov 2014, 1:53 PM
Hello,
I am new to extjs. Now I need to customize the head container for grid component. For example, add a checkbox in the header container. I read the source code of grid component but it seems that It is very hard to grasp the core code of it. even i can't find the code where the header container is generated for grid.

Can anyone give me some suggestions or point out the right direction of studying extjs?

Thanks in advance.

Hi leilei_2014--

Welcome to Ext JS!

Can you expand a bit on what you're after? For example, you could configure your grid with a checkbox selection model which will automatically render a column of checkboxes (including a checkbox in the header).

Here's an example:

d9o

If that's not what you're after, could you provide some more detail about what you'd like to accomplish?

Thanks!

leilei_2014
14 Nov 2014, 1:08 AM
Hi joel.watson,

Thank you for your reply.
what you said is not I am after. the checkbox selection model can make a column with checkbox. However i need to control the grid header. I don't need the checkbox in the grid cell instead I need to embed a checkboxor or other component in grid header container .

Can you show me some way?

Thanks

joel.watson
17 Nov 2014, 8:05 AM
Ah, understood. In that case, I'd suggest checkout the Big Data Grid example here: http://docs.sencha.com/extjs/4.2.3/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#big-data-grid

It shows how to add components to the grid column headers.

Hope that helps--thanks!