B4J Question ABMaterial ABMTable Editable Rows on Demand (SOLVED)

walterf25

Expert
Licensed User
Hi All, i am working on an inventory application for work, I am using the ABMTable and i found a thread that shows how to make the rows editable, but I was wondering if there's a way either to make only certain cells of the table editable, or a way to make the row which has the focus or the row which has been clicked on editable, in my case I am displaying a lists of components and equipment but i only want to allow the users to edit certain cells of a specific record and not all the cells, is there a way to get this done with ABMaterial library?

Thanks,
Walter
 

Harris

Expert
Licensed User
I guess this was a question that was not required... OP figured it out and did not respond...

We really don't like these empty posts - helps no one...

You took the time to ask (us to help you) so:
Pls be kind, - finalize your post... (solved or not)

Thanks
 
Last edited:

Harris

Expert
Licensed User
prefer using a seperate modalsheet for the input
Yes, it is just one click away - and you can edit any cell in the row from the sheet. Trying to validate a cell click (edit) would be very complicated and not worth the time and effort to code...

I got REAL bugs (flies) crawling all over my screen now. WTF? Spring has sprung...
 

walterf25

Expert
Licensed User
I guess this was a question that was not required... OP figured it out and did not respond...

We really don't like these empty posts - helps no one...

You took the time to ask (us to help you) so:
Pls be kind, - finalize your post... (solved or not)

Thanks
Sorry Guys, i am juggling various projects at the same time.

I believe I found a solution which works fine for me.

What I did since as @alwaysbusy mentioned, since the editable is done on a cell theme level, i simply applied different themes to the cells i want to be editable, and a different one to the ones i don't want to be editable, this seems to work perfect for my purpose.

theme for the not editable cells.
B4X:
    theme.Table("tbl1theme").AddCellTheme("buttonsnocolor")
    theme.Table("tbl1theme").Cell("buttonsnocolor").ActiveBackColor = ABM.COLOR_BLUEGREY
    theme.Table("tbl1theme").Cell("buttonsnocolor").ActiveBackColorIntensity = ABM.INTENSITY_LIGHTEN2
    theme.Table("tbl1theme").Cell("buttonsnocolor").IsEditable = False
Theme for the editable cells.
B4X:
    theme.Table("tbl1theme").AddCellTheme("positive")
    theme.Table("tbl1theme").Cell("positive").BackColor = ABM.COLOR_GREEN
    theme.Table("tbl1theme").Cell("positive").BackColorIntensity = ABM.INTENSITY_LIGHTEN3
    theme.Table("tbl1theme").Cell("positive").ActiveBackColor = ABM.COLOR_GREEN
    theme.Table("tbl1theme").Cell("positive").ActiveBackColorIntensity = ABM.INTENSITY_LIGHTEN1
    theme.Table("tbl1theme").Cell("positive").Align = ABM.TABLECELL_HORIZONTALALIGN_LEFT
    theme.Table("tbl1theme").Cell("positive").IsEditable = True
Thanks all for your help.

Walter
 
Top