Jump to content

UniDBGrid.Column.GroupHeader more than two levels?


Sherzod

Recommended Posts

 Does Sencha Ext JS support this feature?

 

Hello Farshad Mohajeri.

Thank you for responding.

Yes it is possible. Basically, I did it in the grid, but I failed to connect to the data (store)...

(I was not able to attach a file)

function OnReconfigure(sender, store, colModel)
{
  var me = sender;                    
                                  
        var column = Ext.create('Ext.grid.column.Column',  
           {text: 'Multi Header', 
           columns: [
             {text: '', width: -1, sizeable: false, dataIndex: '0', resizable:false},
             {text: '', width: -1, sizeable: false, dataIndex: '1', resizable:false},             
             {header: 'Name', dataIndex: '2', width: 250 },
             {text: '', width: -1, sizeable: false, dataIndex: '3', resizable:false},
             {text: '2, 3, 4, 5',
              columns: [
                      {text: '2',
                         columns: [
                           {text: '2.1',
                              columns: [
                                {header: '1', dataIndex: '4', width: 120 }               
                              ]
                           },
                           {text: '2.2',
                              columns: [
                                {header: '2', dataIndex: '5', width: 120 }                     
                              ]
                           }
                         ]                         
                      },
                      {text: '3',
                         columns: [
                           {text: '3.1',
                              columns: [
                                {header: '3', dataIndex: '6', width: 120 }               
                              ]
                           },
                           {text: '3.2',
                              columns: [
                                {header: '4', dataIndex: '7', width: 120 }                     
                              ]
                           }                   
                         ]
                      },
                      {text: '4',
                         columns: [
                           {text: '4.1',
                              columns: [
                                {header: '5', dataIndex: '8', width: 120 }               
                              ]
                           },
                           {text: '4.2',
                              columns: [
                                {header: '6', dataIndex: '9', width: 120 }                     
                              ]
                           }                      
                         ]
                      },
                      {text: '5',
                         columns: [
                           {text: '5.1',
                              columns: [
                                {header: '7', dataIndex: '10', width: 120 }               
                              ]
                           },
                           {text: '5.2',
                              columns: [
                                {header: '8', dataIndex: '11', width: 120 }                     
                              ]
                           }                      
                         ]
                      }
                   ]
                }              
              ]  
           },
           {text: '', width: -1, sizeable: false, dataIndex: '12', resizable:false}          
          );                                                    
                                
        sender.headerCt.insert(1, column);
              
        sender.getView().refresh(); 
}

You could help me with a store?

thanks...

Link to comment
Share on other sites

Hi,

 

I Change ExtJS group-header-grid.js Example for testing.

There is no limit on the number of columns heaer level, and Each column can be separated into multiple columns header.

Example Grid with 3 level Header and Store in Here

 

Regards

Link to comment
Share on other sites

  • Administrators

Hello Farshad Mohajeri.

Thank you for responding.

Yes it is possible. Basically, I did it in the grid, but I failed to connect to the data (store)...

(I was not able to attach a file)

function OnReconfigure(sender, store, colModel)
{
}

You could help me with a store?

thanks...

 

This must be implemented internally.

 

Logged:

0001460: Multiple levels in Column.GroupHedaer

Link to comment
Share on other sites

Hi, Mr. Farshad. I have here a problem: in the grid should be like a multi Header:

                                Schools

                              Schools №1

    School enrollment             Including those in the region

    Boys              Girls            Boys                              Girls

       1                   2                  3                                    4

 

in designtime I do so:

    TVCLDBColumns[0] GroupHeader = ‘schools;school N1;school enrollment;boys’ Title.Caption = ‘1’

    TVCLDBColumns[1] GroupHeader = ‘schools;school N1;school enrollment;girls’ Title.Caption = ‘2’

    TVCLDBColumns[2] GroupHeader = ‘schools;school N1;including those in the region;boys’ Title.Caption = ‘3’   

    TVCLDBColumns[3] GroupHeader = ‘schools;school N1;including those in the region;girls’ Title.Caption = ‘4’

 

Result:

 

                                  Schools

                               Schools №1

     School enrollment             Including those in the region

     Boys              Girls

     1    3              2   4

 

 

please, what I'm doing wrong? thanks...

Link to comment
Share on other sites

Current implementation joins all headers with same level and identical group names under same column.  Workaround is to use "Girls1", "Girls2" instead of "Girls" for both groups.

 

Please add a report to Bug Reports forums regarding this issue.

 

Dear, Farshad Mohajeri.

Sorry, I did not write a report on the Bug Reports and on the other branches of the forum. I have one implementation. If you agree to include this implementation, I think it would extend the functionality UniDBGrid. (Sorry for my bad English.)

 

1. Add properties UseMultiTitle (boolean) in UniDBGrid (By the way this property is implemented in DBGridEh (Ehlib)).

2. And Columns Title fully specify MultiTitle, removing property GroupHeader.

3. Add an internal method for the analysis and generation MultiTitle (hereinafter cite the source code for this problem)

4. There's still a need to analyze the correctness of the input MultiTitle (for example, where possible, indicate the share at the beginning or at the end, or more separators are consecutive.

5. Analyze the list of visible columns to correctly generate columns (perhaps it has already been implemented).

 

I think it will give a lot of advantages:

1. Create MultiTitle.

2. You can immediately see how it will look designtime column model.

...

 

post-906-0-97316300-1363458728_thumb.pngpost-906-0-55899200-1363458759_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...