bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.
https://pluto.weblaze.dev
MIT License
637 stars 291 forks source link

Jump lines in cells #949

Closed TienLen2808 closed 7 months ago

TienLen2808 commented 9 months ago

When my text is longer than the cell's length, the cell's height is not larger and my text does not have line breaks and overflows (abcd......)! I want it to jump lines by itself

PlutoColumn( formatter: (value){ if(value.toString().length > 38) { var text; for (int i = 38; i > 0; i--) { if (value[i].toString() == ",") { text = "${value.toString().substring(0, i + 2)}\n ${value.toString().substring(i +2, value.toString().length)}"; break; } } return text; } else{ return value; } }, width:(MediaQuery.of(context).size.width - 210) > 900 ? (MediaQuery.of(context).size.width - 210) / 3 : 300, backgroundColor: Color(0xffCBDCB4), enableDropToResize : false, enableContextMenu:false, readOnly: true, title: 'S${i+1} (${jumpRange[i]})', field: 's$i', type: PlutoColumnType.text(), footerRenderer: (rendererContext) { return PlutoAggregateColumnFooter(

          rendererContext: rendererContext,
          iterateRowType : PlutoAggregateColumnIterateRowType.all,
          formatAsCurrency: false,
          type: PlutoAggregateColumnType.count,
          alignment: Alignment.centerRight,
          titleSpanBuilder: (text) {
            return [TextSpan(text: text),
              const TextSpan(
                text: ' Staffs',
                style: TextStyle(color: Colors.red),
              ),
            ];
          },
        );
      },
    )
Screenshot 2023-09-29 at 6 00 43 PM
github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.