New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Designing in TableViews #176
Comments
Ok, I got it, I have now added VirtualizedFX, and it's there :) Do you have any documentation on how to add rows to the table because I need to fetch the database into this table
|
I have exactly the same problem, I don't know how to add columns to the mfxtableview |
@kdelgado98 If you want to add columns then you can do something like this. mfxtable is your table name.
I am having an issue with the data population. @palexdev Need your urgent advisory Thanks, |
I'm sorry, this week has been crazy I've been busy the whole time. So, configuring MFXTableView is pretty easy. First you have to create the MFXTableColumns you need MFXTableColumn<Person> nameColumn = new MFXTableColumn<>("Name");
MFXTableColumn<Person> ageColumn = new MFXTableColumn<>("Age");
MFXTableColumn<Person> careerColumn = new MFXTableColumn<>("Career"); Then you must tell the columns how to represent the data, how to create the corresponding cells so: nameColumn.setRowCellFactory(person -> new MFXTableRowCell(Person::getName));
ageColumn.setRowCellFactory(person -> new MFXTableRowCell(Person::getAge));
careerColumn.setRowCellFactory(person -> new MFXTableRowCell(Person::getCareer)); That's it, now the two remaining steps is to add the columns to the table so: table.getTableColumns().addAll(nameColumn, ageColumn, careerColumn); And add the items to the table: table.setItems(people);
OR
table.getItems().setAll(people); A full example is here in the demo: TableViewsController.java Edit: Note that MFXTableColumn also has other constructors, as well as MFXTableRowCell (to specify how to convert the data to a String) |
@palexdev Thanks so much ... Will try this :) Thanks, |
@SaadSidd29 no problem, thanks for using MaterialFX ;) I'll leave the issue open for a bit so if you encounter any other problem let me now and I'll answer asap |
Sure Thanks :) |
Great! I have done it 👍 Hats off bro :) Leaving this open for @kdelgado98 If you need any help you can ask here or can contact me |
Thanks |
Can you advice me on how to make a specific row of a table highlighted when a button is pressed. Functionality refers to requirement that when a row is being read and processed, it should be marked as RED and rest GREEN. |
Well there are several ways you could achieve this
|
can i setGraphic in cell MFXPaginatedTableView (for exemple : MFXButton ) ? |
Read the documentation MFXTableRowCell Sidenote: this issue will be closed by the end of the week since there hasn't been any useful feedback in the last few days |
Thanks i've been too busy this week but thanks for leave this open for me 😅, i will work on it asap and if i have any trouble i will contact you , thanks again |
thanks @palexdev |
Share a minimal reproducible example please so that I can test it |
i have a table of products and i put a tooltip on each row |
I don't think it's related to MaterialFX, it depends on how you implemented the tooltip on the row. |
Anyway, as I said I see no more useful feedback/discussion here specifically related to MaterialFX, so I'm closing this issue |
Hello @palexdev , Secondly, I have gone through this solution: #176 (comment). Thanks |
Hi,
I cannot see any MFXTableViews in my scene builder with version MFX 11.13.5. I can only see MFXLegacyTableView
Also is there any documentation on how to make tables as it has no columns and I need to have columns and filters.
Please look into the image for all elements I am having
Thanks,
Saad
The text was updated successfully, but these errors were encountered: