Android Question How to create grid whidt dinamic columns e rows

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hello to all
I need a council on which component to use to create this grid with rows and columns and variables selected cells (with check boxes).

I enclose picture.

Thank you
 

Attachments

  • Immagine.png
    Immagine.png
    14.4 KB · Views: 309

Roberto P.

Well-Known Member
Licensed User
Longtime User
thanks Erel,
I decided to try to change the TableView class, with CheckBox fields, rather than label fields. There are almost succeeded, I miss two points to be resolved:

Problem
- It is no longer called Cell_Click event, so can not manage storage of the data in the event that the client changes the value of the check

new feature
- I want to handle the row headers (Excel), To show your data string and not check box. So, you have to implement the management of the header row.

This implementation can also be useful to other programmers.

Thank you
 

Attachments

  • image.png
    image.png
    33.7 KB · Views: 298
  • image2.png
    image2.png
    35.9 KB · Views: 330
  • TableCheckBox.zip
    45.2 KB · Views: 243
Upvote 0

klaus

Expert
Licensed User
Longtime User
You need to explain what exactly you want to do.
A table like in your first post is not possible with the Table class.
In your code you define 4 columns for the Headers but only 3 when you add a row !?
Do you want to have different views in the first column ?
If yes, this needs a much more complex change of the Table class.
I don't understand what exactly you want to do in the Header_Click routine.
As Erel already suggested you should use a CustomListView.
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hello Klaus
I created a grid (see picture) that lets the user select the different cells of a table of colors and sizes.

I was able to integrate this functionality into your class, with good success, although I have to improve some parts.

Now I have to find a way to add a check box in the column headers to select all columns or across the row.

I enclose class and a small example, it might be helpful to others.

Thank you
 

Attachments

  • TABLE.png
    TABLE.png
    35.3 KB · Views: 332
  • TABLEVIEW.zip
    45.9 KB · Views: 301
Upvote 0
Top