GigaGrid icon indicating copy to clipboard operation
GigaGrid copied to clipboard

How to achieve subgrouping?

Open ashishdhyani opened this issue 7 years ago • 10 comments

Hi @erfangc ,

var data =[ { col1: '10', col2: '20', col3: '30' }, { col1: '10', col2: '50', col3: '30' }, { col1: '10', col2: '60', col3: '30' }, { col1: '40', col2: '60', col3: '20' }, { col1: '40', col2: '80', col3: '20' }, { col1: '70', col2: '80', col3: '10' } ]; var columns = [ {colTag: 'col1', title: 'Column 1'}, {colTag: 'col2', title: 'Column 2'}, {colTag: 'col3', title: 'Column 3'}];

<GigaGrid initialSortBys={[{"colTag":"col1"}]} data={data } columnDefs={columns} />

Now how to acheive sub grouping? I want to achieve something like you have given in the example : http://erfangc.github.io/GigaGrid/

I tried using initialSubtotalBys , but not able to achieve.

Could you please help me ?

Regards Ashish

ashishdhyani avatar Mar 07 '17 07:03 ashishdhyani

actually I cant see the (+) button to expand it. is this correct way to provide initialSubtotalBys ?

<GigaGrid initialSubtotalBys={[{"colTag":"col3"}, {"colTag":"col4"}]} data={this.props.pivotData} columnDefs={this.props.pivotColumns} />

@erfangc , could you please help me on this ?

ashishdhyani avatar Mar 07 '17 08:03 ashishdhyani

Do you have a screenshot

erfangc avatar Mar 07 '17 15:03 erfangc

@erfangc, attached screenshot. image

Also it stopped displaying the values for col2.

without any subgrouping image

pivotData is : [ { col1: '10', col2: '20', col3: '30', col4: '70' }, { col1: '10', col2: '50', col3: '30', col4: '70' }, { col1: '10', col2: '60', col3: '30', col4: '70' }, { col1: '40', col2: '60', col3: '20', col4: '70' }, { col1: '40', col2: '80', col3: '20', col4: '70' }, { col1: '70', col2: '80', col3: '10', col4: '70' } ]

pivotColumns are: [ { colTag: 'col1', title: 'Column 1' }, { colTag: 'col2', title: 'Column 2' }, { colTag: 'col3', title: 'Column 3' }, { colTag: 'col4', title: 'Column 4' } ]

<GigaGrid initialSubtotalBys={[{"colTag":"col3"}, {"colTag":"col4"}]} data={this.props.pivotData} columnDefs={this.props.pivotColumns} />

ashishdhyani avatar Mar 08 '17 00:03 ashishdhyani

I am not seeing the issue on my end when trying the same ... perhaps a CSS conflict? you should do an inspect element ...

also the version I ran was 0.8.2

erfangc avatar Mar 09 '17 13:03 erfangc

Actually no css conflict, i don't have any other css for now. I am trying to use this with React 15.1, Is it compatible with React 15 ?

ashishdhyani avatar Mar 10 '17 02:03 ashishdhyani

Should be compatible with react 15, what does your inspect element say On Thu, Mar 9, 2017 at 9:35 PM Ashish Dhyani [email protected] wrote:

Actually no css conflict, i don't have any other css for now. I am trying to use this with React 15.1, Is it compatible with React 15 ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erfangc/GigaGrid/issues/90#issuecomment-285556168, or mute the thread https://github.com/notifications/unsubscribe-auth/AFuUHvMcLWKeVq6ZNvthTA6f69yy-j2fks5rkLb0gaJpZM4MVIVw .

erfangc avatar Mar 10 '17 03:03 erfangc

element inspection looks something like this image

ashishdhyani avatar Mar 11 '17 15:03 ashishdhyani

Oh ... I think all you need to do is include font-awesome in your project ... sorry about that

erfangc avatar Mar 11 '17 18:03 erfangc

http://fontawesome.io/get-started/

erfangc avatar Mar 11 '17 18:03 erfangc

I am in the middle of rewriting a large portion of the table that makes a bit inefficient and unclean ... having a font dependency is definitely on the list of things I want to remove

erfangc avatar Mar 11 '17 18:03 erfangc