How do I change a Table header cell?

fdx12345

Active Member
Licensed User
Longtime User
I have a Table with 5 columns and 5 headers. Everything works fine. I need to be able to change the Header value on a particular column on the fly without loosing table data. Can this be done? I am hoping there is some header command similar to the Table command of .SetValue(col, row, text).
 

fdx12345

Active Member
Licensed User
Longtime User
How do I write to a specific label in the header?

I can read the text of a specific label within the Header but I do not see a way of writing to just that label without writing to all of the labels at the same time.

The Header.GetView(x) will let me see what is at col(x) of the lable group but there is no Header.Setview to set the data at a specific header location.
 
Upvote 0

fdx12345

Active Member
Licensed User
Longtime User
It works

I figured out the above but did not realize I could go the opposite direction with a save lbl.Text = "New name". I thought it was one direction only.

Everything is working now.
 
Upvote 0

tcgoh

Active Member
Licensed User
Longtime User
Hi,

I am also trying to change the header cell text, but I don't know where to put Erel's code of
B4X:
Dim lbl AsLabel = Header.GetView(x)
lbl.Text = "New name"

Can you please help. I am using table class ver1.29

Thanks
 
Upvote 0

tcgoh

Active Member
Licensed User
Longtime User
Thanks Erel,

Got it running with the Pubic variable in the table class and
Dim lbl As Label = Table1.Header.GetView(x)

Regards
 
Upvote 0
Top