GigaGrid
GigaGrid copied to clipboard
How to achieve subgrouping?
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
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 ?
Do you have a screenshot
@erfangc, attached screenshot.
Also it stopped displaying the values for col2.
without any subgrouping
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} />
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
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 ?
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 .
element inspection looks something like this
Oh ... I think all you need to do is include font-awesome in your project ... sorry about that
http://fontawesome.io/get-started/
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