Open saravananraj21 opened 5 years ago
Hi @saravananraj21,
You can add the data to your TableDataAdapter and then trigger a new rendering by calling the notifyDataChanged()
method. If you want to enable the user to trigger a refresh (pull to refresh) you could use the pro version. You can test the feature in the Example App in the section "Load Data".
For setting the text size I need to know which TableDataAdapter you are using. If you are using the SimpleTableDataAdapter and SimpleTableHeaderAdapter you can use the setTextSize() method.
Hi @ISchwarz23.
I have used SortableTableView
and loaded the data using SimpleTableDataAdapter
. Can you help me how to sort the table and any sample code for that!
To make the SortableTableView SortableTableView, you have to set a comparator for each column that should be sortable, by using the SortableTableView#setColumnComparator() method. You can find the code of the example app here. But in this example I used domain objects as table data and not string arrays.
In my case I don't know how many columns and rows of data will be there.I have to set everything dynamically.Is it possible to do that?
Hi @ISchwarz23
How to change the text size? I am using SimpleTableDataAdapter
and tried to change the size using setTextsize() method but getting error! Please share a sample code.
Hi @saravananraj21, There is not much that can go wrong when setting the text size. Check the API here. If the error remains, post the error here.
Hi @ISchwarz23 I am getting error when calling the setTextsize().
Can you help me regarding this issue!
Hi,
this is notan TableView issue. The setTextSize()
method returns void. This is why you get this "error". To resolve it, just change your code like this:
SimpleTableDataAdapter dataAdapter = new SimpleTableDataAdapter(getActivity(), lstrarr_data);
dataAdapter.setTextSize(10);
dynamic_grid(lint_i).setDataAdapter(dataAdapter);
Hi @ISchwarz23 Thanks! It worked!
In my case I don't know how many columns and rows of data will be there.I have to set everything dynamically.Is it possible to do that?
Is there any solution for the above?
You can add the data to your TableDataAdapter and then trigger a new rendering by calling the notifyDataChanged() method.
To change the number of columns use the TableColumnModel
(like TableColumnWeightModel
) and set the number of columns you need using the setColumnCount( int )
method.
Hi @ISchwarz23 I have a json array of data to form the table.I need the data to be arranged in the table and the table must be sortable. How can I achieve this using SortableTableView?
Please read the section about showing custom data and showing sortable data.
Hi! I need to load dynamic data from database. How to do that ? I want to reduce the text size of headers and table view. Can you help me regarding this.