How to create Spreadsheet in Flutter - flutter

How to create spreadhseet like Widget in Flutter (only for displaying data).
Currenly I have used Datatable but it does not support 1. fixed header 2. scrollable body.
I want following features:
The headers shoule be fixed.
the body should be scrollable (in both axes)
Currently my Datatable is inside a column > Expanded > SingleChildScrollView(horizontal) > SingleChildScrollView (vertical) > DataTable. Although I am able to scroll the complete Table in both the directions but 1. not simultaneously (i.e. it scrolls either horizontally or vertically), 2. Headers should not scroll, when scrolled vertically.
How can I achieve this ?

It seems that you need scroll controller that allows two or more scroll views to be in sync. In his case, you can use linked_scroll_controller plugin.
You can follow the example in this blog post for a step by step tutorial on how to achieve this.
Sample taken from the blog, check the complete source code here:

Here is an another package for this purpose: syncfusion_flutter_datagrid.
It has several features:
Editing - Allows users to edit cell values.
Sorting - Sort one or more columns in the ascending or descending order.
Stacked headers - Show unbound header rows.
Paging - Load data in segments.
Freeze Panes - Freeze the rows and columns when scrolling the grid.
And more, details in document
However, scrolling simultaneously is something different feature in this case.
You can try InteractiveViewer, but this not recommended in this case. Because both widgets, InteractiveViewer and DataTable, are very powerful widget that may build some conflict.

Related

Flutter - How to link three columns so that they scroll together

I have three columns inside a row. The contents of the columns are generated by a listbuilder getting data from a database. Right now each column scrolls individually but I need them to scroll as one. Is this even possible in flutter or should I have made a gridview instead of three separate columns?
See https://stackoverflow.com/a/54879937/6447123
It works using a NotificationListener<ScrollNotification> plus an independent ScrollController for each scrollable Widget that should be synchronized.
You can use TrackingScrollController too

Whats the difference between DataTables widget and Tables Widget in Flutter?

Im going to create an excel like application in Flutter where the user can input a quantity to one of the cells and the app automatically calculate its values based on quantity.
Shall i use DataTables or Tables widget?
Both accept widgets as cell content like TextField, Slider or just Text. Anywhere there are some differences:
Feature
Table
DataTable
Checkbox column
no
showCheckBoxColumn
Set column width
columnWidth
no
Set row height
no
dataRowHeight
Sortable
no
integrated
If a cell with a no this does not mean, its not possible. The feature is just
not directly supported by the widget. In all cases sizes will computed according to Flutters rendering engine: constraints go down, sizes go up.
Anybody please feel free to add more content to above comparison.

RCP - How to add a Minimize button to a cell of a GRID?

I'm working on an RCP application. It uses EMF. As per the requirement I got, i'm supposed to add a minimize and maximize button to a cell of a Grid.
Requirement:
The table includes three columns with multiple rows. The first column gives description. Since the content is big and lot many rows , it is challenging to scroll. Hence, the cell initially should show only one line of total text ending with "...", and the cell should have a minimize button and maximize button. Can any one give me understanding about the possibility of this requirement. Thanks in advance.enter image description here
The default SWT Table does not support shrinking rows. You could try it with Nattable
It is a SWT implementation of a table. It offers advanced functions such as treeview of a table.

Filemaker with Html table layout

I'm designing a form layout in FileMaker, and I'm spending a ton of time just trying to get all the controls in the right spot. Is there some way of doing a table layout? I just want to say "this control is in this cell" and let the table take care of all the formatting. Instead of having to set the position on each object just right.
What I Have
A form with a bunch of fields, organized in a table manner, i.e., rows and columns.
Example:
What I Want
To not have to specify the exact position of each individual control. Every time one element moves or needs to resize, it ends up screwing up the entire row, column, or "table", and I end up needing to move every field individually accordingly.
Is there a better way to organize fields in a form like this so that I don't have to manipulate the position and width of every "cell" in a row or column individually?
I think this is made easier with the use of the Inspector in layout mode. In particular, the controls in the "Arrange & Align" section on the "Position" tab of the inspector.
For example, you can quickly select all fields on the same "row" and align them to the top and make them the same height and width as needed.
If you are using FM 13, you may also want to make use of styles to make it easier to set the same formatting quickly across similar objects.
If you're a web developer you might want to experiment using the WebViewer. You can use Javascript for creating a nice table. Then you can interact with that table through calling a script in FileMaker.
Or just stick to a portal like Michael.Hor recommended.

How to make a specific column be moving in the SWT table in Eclipse RCP?

I have created a SWT table with 23 columns in the Eclipse RCP. The table has only Horizontal Scroll Bar. In runtime, it is obvious that the columns to the left get obstructed when we scroll to Rightward and vice-versa because our view (window) can not display all columns at once. But, I want one of the columns(say col. 2) at Left of the Table to be movable, so that it should be floating at very Left of the table when I scroll the table data Rightward at runtime.
I've tried by setting the col. property movable like :
tblData.getColumn(1).setMoveable(true);
But, it can only make the col.2 be moved (by dragging withing table header). But I wish the column be floating on the table while scrolling (to rightwards/Leftwards) other data in table.
Please, suggest me how to do this.
There is no really cool way of achieving what you want using Table. But there is an official Snippet showing how to emulate something similar here.
If you don't mind using an SWT table implementation which is not natively drawn, apparently NatTable supports "Frozen columns".
Also one of Nebula's custom table implementations might be capable to do what you want. There's Grid and XViewer.