---
title: "Discussion on \"Columns\" | Hashnode"
description: "Discussion on \"Columns\". Default properties of columns\nColumns must be passed to the columns property, which is a List<PlutoColumn> type when creating a PlutoGrid.\nfinal List<PlutoColumn> columns = [\n  PlutoColumn(\n    title: 'Id',\n    field: 'id',\n    type: PlutoColumnType...."
url: "https://hashnode.com/posts/columns/62cc0882222e2fa74e9bcaf3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Columns](https://pluto.weblaze.dev/columns?utm_source=hashnode&utm_medium=feed)

Default properties of columns Columns must be passed to the columns property, which is a List<PlutoColumn> type when creating a PlutoGrid. final List<PlutoColumn> columns = \[ PlutoColumn( title: 'Id', field: 'id', type: PlutoColumnType....

Jul 11, 2022 · 6 min read · pluto.weblaze.dev  
Updated Oct 21, 2022  
Read the article

-   [#plutogrid](https://hashnode.com/tag/plutogrid)
-   [#flutter](https://hashnode.com/tag/flutter)
-   [#column](https://hashnode.com/tag/column)

## Written by

[manki kim](https://hashnode.com/@PlutoGrid)

@PlutoGrid · Seoul, Korea

  
[View profile](https://hashnode.com/@PlutoGrid)

Development of Flutter packages used in admin service or CMS, etc.

I've mainly been doing backend web development. I also have a technology for web front-end, and recently I mainly develop Flutter packages.

## Responses 4

Markdown supported · ⌘↵ to post

[Terje](https://hashnode.com/@tabinnorway)

[Sep 25, 2023](https://hashnode.com/posts/columns/62cc0882222e2fa74e9bcaf3/comment/65115a6c354de14664891c5a)

The framework is truly awesome. Is it possible to have vertical borders on ColumnGroups and NOT on Columns? This is to visually distinguish groups from each other better. It would also, possibly, be a good thing to have the ability to change the background colors on columns/column groups as well as on rows.

[Jan Krueger](https://hashnode.com/@JanK)

[Dec 22, 2022](https://hashnode.com/posts/columns/62cc0882222e2fa74e9bcaf3/comment/63a474af3916c9c9a801d9a3)

Is it possible to create an action column having a button or link and then start an action using the data of this row? Every row should show the button or link. Thx jan

[Rick](https://hashnode.com/@Moustache)

[Nov 8, 2022](https://hashnode.com/posts/columns/62cc0882222e2fa74e9bcaf3/comment/636aa78b112160e28e515a34)

Is there any event that is triggered when someone drag a column or hide a column?

I'm looking for the trigger so I can store and save the column order after dragging and save the visible columns.

[manki kim](https://hashnode.com/@PlutoGrid)

[Nov 10, 2022](https://hashnode.com/posts/columns/62cc0882222e2fa74e9bcaf3/comment/636aa78b112160e28e515a34#reply-636d73a94597d909de5819fe)

You can listen for column move events with the PlutoGrid.onColumnsMoved callback. However, there is no event for hiding a column, adding a column, or deleting a column. I have attached the code below for these events.

```
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:pluto_grid/pluto_grid.dart';

import '../dummy_data/development.dart';

class EmptyScreen extends StatefulWidget {
  static const routeName = 'empty';

  const EmptyScreen({Key? key}) : super(key: key);

  @override
  _EmptyScreenState createState() => _EmptyScreenState();
}

class _EmptyScreenState extends State<EmptyScreen> {
  late List<PlutoColumn> columns;

  late List<PlutoRow> rows;

  late PlutoGridStateManager stateManager;

  late StreamSubscription<PlutoNotifierEvent> notifierEvent;

  late final columnsNotifier = {
    stateManager.moveColumn.hashCode,
    stateManager.hideColumn.hashCode,
    stateManager.hideColumns.hashCode,
    stateManager.insertColumns.hashCode,
    stateManager.removeColumns.hashCode,
    stateManager.toggleFrozenColumn.hashCode,
  };

  @override
  void initState() {
    super.initState();

    final dummyData = DummyData(10, 100);

    columns = dummyData.columns;

    rows = dummyData.rows;
  }

  @override
  void dispose() {
    notifierEvent.cancel();

    super.dispose();
  }

  void _notifyListener(PlutoNotifierEvent event) {
    if (event.notifier.firstWhere((e) => columnsNotifier.contains(e)) != -1) {
      print('changed columns');
      // Column currently displayed
      print(stateManager.columns.length);
      // All columns including hidden columns
      print(stateManager.refColumns.originalList.length);
      // fixed left column
      print(stateManager.leftFrozenColumns.length);
      // non-fixed column
      print(stateManager.bodyColumns.length);
      // fixed right column
      print(stateManager.rightFrozenColumns.length);
      // The index of the column according to the order in which the columns are displayed List<int>
      // Assuming there is a column [0,1,2,3,4]
      // If number 3 is fixed to the left, [3,0,1,2,4]
      print(stateManager.columnIndexesByShowFrozen);
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Container(
          padding: const EdgeInsets.all(15),
          child: PlutoGrid(
            columns: columns,
            rows: rows,
            onLoaded: (PlutoGridOnLoadedEvent event) {
              stateManager = event.stateManager;
              notifierEvent = stateManager.streamNotifier.stream.listen(
                _notifyListener,
              );
            },
          ),
        ),
      ),
    );
  }
}
```

[Joel Varghese Joy](https://hashnode.com/@Joel94)

[Oct 18, 2022](https://hashnode.com/posts/columns/62cc0882222e2fa74e9bcaf3/comment/634e53e0b484b889d8bf2784)

Can we have a custom column? For Eg: I wanted to provide an icon with the title in the column. Is the renderer for that?

[manki kim](https://hashnode.com/@PlutoGrid)

[Oct 18, 2022](https://hashnode.com/posts/columns/62cc0882222e2fa74e9bcaf3/comment/634e53e0b484b889d8bf2784#reply-634e5530b484b889d8bf27d3)

The renderer is a property that customizes the cell (row) of the corresponding column. Customizing column titles is possible with titleSpan .

```
/// You can customize the column title.
PlutoColumn(
 titleSpan: const TextSpan(
   children: [
     WidgetSpan(
       child: Text(
         '* ',
         style: TextStyle(color: Colors.red),
       ),
     ),
     TextSpan(text: 'column title'),
   ],
 ),
);
```
