Comments (11)
Fantastic, thank you so much! I think you're on to a real desktop/web grid for businesses everywhere!
from pluto_grid.
You can create a row that matches the current column information with getNewRow and getNewRows of stateManager.
Change the cell value of the created row to the desired value.
After the change, create a row to be added with insertRows, prependRows, appendRows, etc. of the stateManager.
Please let me know if you need more explanation or examples.
from pluto_grid.
Is it the case of using by providing List to StreamBuilder?
child: StreamBuilder<List<PlutoRow>>(
stream: ...,
builder: (context, snapshot) {
return PlutoGrid(
columns: columns,
rows: snapshot.data,
onChanged: (PlutoOnChangedEvent event) {
message(context, event.toString());
},
onLoaded: (PlutoOnLoadedEvent event) {
stateManager = event.stateManager;
},
);
}
),
It doesn't work, currently passing stream data to the rows property.
Passing stream data to the row property to work would be added in the future.
Not now, but by adding a constructor like PlutoGrid.streamBuilder for example.
Below is an example of general row addition and deletion.
example
...
return PlutoGrid(
columns: columns,
rows: rows,
/// Handle when the cell value changes.
/// class PlutoOnChangedEvent {
/// final int columnIdx;
/// final PlutoColumn column;
/// final int rowIdx;
/// final PlutoRow row;
/// final dynamic value;
/// final dynamic oldValue;
/// ...
onChanged: (PlutoOnChangedEvent event) {
message(context, event.toString());
},
onLoaded: (PlutoOnLoadedEvent event) {
stateManager = event.stateManager;
},
);
...
/// Adding row.
stateManager.appendRows([
PlutoRow(cells: {
'text': PlutoCell(value: ''),
'number': PlutoCell(value: 0),
}),
]);
...
/// Removing current row.
stateManager.removeCurrentRow();
from pluto_grid.
It was exactly as you described, but I didn't realize the stateManger was the route to do this. Thank you!!!
from pluto_grid.
It is not documented yet. It is not enough to develop it alone. I will work hard.
from pluto_grid.
I just ran into your pluto grid the other day. I am a new flutter dev, but have been doing pascal for decades. Your grid is what a business grid should be. I probably can not help code, but I will gladly test, or help with documentation if you like. Great job so far!!!
from pluto_grid.
Yes, anything is good.
I've just created a grid, but I haven't used it except for testing.
That's why problems, methods, documentation, and tests that occur during use are all good.
The Pluto series aims to develop a package for Admin or Cms.
There is also one called PlutoMenuBar.
I plan to keep making these things.
from pluto_grid.
I will go over it this weekend, and see what I can do to help. I see that you have implemented stateManager.appendRows(), if you added a removeRows(), the stream updates would be simple.
You have really done so much with key handling and everything. Bravo!
from pluto_grid.
Thanks, I will finish adding the test code now, and I will work on adding removeRows().
from pluto_grid.
@bosskmk Hi there, just tried this feature of adding new rows, but there is a problem.
I am implementing a feature of copying and pasting rows, and what happens is that the newly added rows have same cell key as the ones copied and any change, even the click of mouse is depicted on the rows that were originally copied.
I have thought of a work around, that is the I get the data from the rows that are copied and create new PlutoRow for the data. Would you also recommend this workaround or is there something better?
from pluto_grid.
- Created a method that takes values from a row and creates a desired object(List) using
statemanager.currentSelectingRows
- Mapped the list of object to
PlutoRow
- Then appended the plutoGrid using
statemanager.appendRows
from pluto_grid.
Related Issues (20)
- Is this repo dead? HOT 25
- [Help] i want to reload all data when click button HOT 2
- Horizontal scrollbar isn't shown with isAlwaysShown: true HOT 1
- Is there a way to pre-assign filters to specific columns during Grid rendering? HOT 4
- How to rows data refresh(update) with loader on click button HOT 2
- [Bug] Deploy web HOT 4
- [Bug] deployerror HOT 10
- [Bug] New Version Flutter - Error HOT 3
- [Help] How to group rows for server side data. HOT 2
- How to wrap inside ListView ? [Help] HOT 2
- [Help] Do we need to manually dispose stateManager? HOT 2
- [Feature] table without header or header is hidden. HOT 2
- [Feature] table without header or header is hidden. HOT 2
- Filter text onSubmit HOT 2
- virtual scroll to support more than 10 million records HOT 4
- [Help] setSelectionMode is not working? HOT 2
- Pluto Grid should respect the system theme of the OS HOT 2
- [Other] How to Change Text Color within "filterContains" in PlutoGrid? HOT 4
- [Help] How to order a column with numeric values HOT 3
- [Bug] Deselect currentRow HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pluto_grid.