Unique grid id of ag-grid - ag-grid

I am trying to make vuex state that have grid ids for the first dimension.
What I want to make is a page with multiple ag-grids which share the vuex state.
Is there anything I can use as a grid id in ag-grid?

Related

Flutterflow and Supabase: How do I filter one ListView in flutterflow based on the selected item in a parent ListView with data supplied by Supabase?

How do I filter one ListView in flutterflow based on the selected item in a parent ListView with data supplied by Supabase?
I have two tables in Supabase (singers, songs) that are linked by the Singer ID. In Flutterflow I have a ListView that has a backend query to the Singers. I want to add another ListView within the first ListView to display a list of the songs from the songs table. How would I filter the backend query on the second ListView to filter based on the selected item in the first ListView?
I tried to filter but cannot work out how best to do this. Within the first ListView i have multiple containers. There is a separate container containing the second ListView that I am attempting to bind to the Songs table filtered by the singer in the first ListView.
Note: I am using Flutterflow rather than native Flutter
Ok i've answered my own question.
Firstly when creating the songs table in Supabase I did not create the policy. Each table in Supabase needs a policy.
Next, edit the backend query on the second ListView. Add in a filter.
For Field Name, choose Singer, the ID in the Songs table that links to the Singers table.
For Relation choose Equal To For Value Source choose From Variable Then choose ID from the Singers table.
The filter knows that a particular singer is selected from the parent ListView and filters as such.

AG-Grid: Add and remove columns in column groups while maintaining the state of other columns

I have a table built with AG Grid which needs to display different columns depending on the type of data we give it. This is proving slightly difficult, as I can't find a proper interface in AG Grid which allows you setup new columns in existing column groups, and without blowing up user-driven changes (hidden columns, resizing, pinning, etc).
The biggest issue is that I can't figure out how to access column group definitions.
gridOptions.api.getAllColumns()
This function from aggrid does not directly provide column groups, just the child columns. Looping through the columns via this function, they have a parent property, but that does not include the coldef for the column group, which means there isn't even really a way to reconstruct the coldef based on the data you get from it (also, the parent property is private in typescript).
Here is a rough plunker, modified from one of the ag grid documentation examples which illustrates it
https://plnkr.co/edit/C8TrwlkFDg5O5V1RJkng?p=preview
I did try having all the columns present in the table at all times, and hiding them programmatically based on the incoming data, however that creates several issues with the default column show/hide functionality (you can manually show the invalid columns). Using the initial coldefs won't work too well either, since that will discard any modifications the user has made to the columns.
Is there anyone out there who can point me in the right direction?

Google Chart - DataTable inside a form

I have a table created with DataTable of Google Chart, which has a column with a drop-down list. In this way the user can set the proper value of a row.
I am working in Python and Flask and I can retrieve the request data correctly. The problem is that the table, given the amount of data, is showed in pages, each one with 20 rows. When I retrieve the request I get only those 20 rows, so I have no way to know what the user set in the other pages.
How can I get the values of all pages?
Moreover, I noticed that when I change page and then I go back, the table forgets the user changes, so I think I should be careful also to this fact.
Finally, I solved the problem by using a dictionary containing all the changes made to the table and updating the html string inside the table to keep the content updated.

Telerik MVC: Generic Grid

I am wondering if I could design a generic way to design a Telerik MVC Grid.
Example:
Model is a List of FieldDescriptor. A FieldDescriptor has a name, a value and a type.
Thus I want to show the colums of the Grid according to the data in the model - depending on which fields come and what their type is.
But the Telerik MVC Grid only knows how to make a column, if you explicitly refer a model property.
I found a blog that explained what I think you are asking. How to display a dynamic datatable when you don't know what the columns are until run time.
You can loop through the columns in model to build the grid, then use ajax to go get the data.
Here the link www.alexrogan.com
Here is how you can loop through the column values of a datatable to create the grid columns.
.Columns(columns =>
{
foreach (System.Data.DataColumn column in Model.Columns)
{
columns.Bound(column.DataType, column.ColumnName);
}
})

how to relate a flextable row with a database row in gwt

i'm creating a simple project to try gwt, but i'm a real noob :)
i've a table in my db, each row in this table has a unique id.
i want my application to read this table and display it's contents in a flextable, omitting the column containing the unique id in the db, 'cause the user is not interested in that id.
after that, i want the user to click on a row of the flextable and get a detailed view... but i need my unique id to get the detailed data about that row in my db!
i'm able to determine in which cell of the flextable the user clicked, so i created a simple widget with a string property and an int property, and i add this widget to the flextable setting the string property to the text from the db i want to display in the flextable and the int property with the db id value... when the user clicks, i get the widget contained in the cell and i can get my id back... but it looks like a very complex solution.
Creating a custom widget is the way to go as soon as your requirements exceed the functionality of the standard widgets provided by GWT.
Note: you may want to reconsider and use Grid instead of FlexTable. Grid seems better in your case since each row contains the same number of cells. See related topic about Grid and FlexTable comparison.