Posted 3 April 2023, 4:29 pm EST
I have a table created by FlexGrid component. On my table I have 2 level of groups, and these groups are collapsed by default. When I expand parent group, I want all children groups to be expanded automatically. Is there a way to achieve this?
my code is like below:
<FlexGrid
        itemsSource={source}
        initialized={(flexgrid: wjGrid.FlexGrid) => {
          setTimeout(() => {
            flexgrid.autoSizeRows();
            flexgrid.collectionView.refresh();
            flexgrid.collapseGroupsToLevel(0);
            setIsInitialized(true);
            flexgrid.focus();
          }, 50);
        }}
        id="ltc_sheet"
        isReadOnly={true}
        frozenColumns={1}
        showMarquee={true}
        autoRowHeights={true}
        style={{
          display: isInitialized ? 'block' : 'none',
        }}
      >
        <FlexGridFilter
          showFilterIcons={true}
          showSortButtons={true}
          filterColumns={Object.keys(wijmoData[0])}
        />
        {columns?.map((item, index) => (
          <FlexGridColumn
            header={item.header}
            binding={item.binding}
            minWidth={item.minWidth}
            key={item.header}
            allowResizing={item.allowResizing}
            visible={item.visible}
          />
        ))}
      </FlexGrid>
                                