B4J Question ABMaterial ABMTable Editable Rows on Demand (SOLVED)

Discussion in 'B4J Questions' started by walterf25, May 2, 2019.

  1. walterf25

    walterf25 Well-Known Member 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
     
  2. Harris

    Harris Well-Known Member Licensed User

    Pls post link...
     
  3. DonManfred

    DonManfred Expert Licensed User

    Last edited: May 3, 2019
  4. alwaysbusy

    alwaysbusy Expert Licensed User

    You are not yet 100% awake @DonManfred :) He is talking about an ABMTable, not a B4XTable
     
    DonManfred likes this.
  5. DonManfred

    DonManfred Expert Licensed User

    OUPS.... Sorry then ;-)
     
    Harris likes this.
  6. Harris

    Harris Well-Known Member 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: May 6, 2019
  7. alwaysbusy

    alwaysbusy Expert Licensed User

    From what I recall the editable is set on cell theme level. I honestly never use it and prefer using a seperate modalsheet for the input/edit because one has much more control over the users input.
     
    Harris likes this.
  8. Harris

    Harris Well-Known Member Licensed User

    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...
     
    alwaysbusy likes this.
  9. walterf25

    walterf25 Well-Known Member Licensed User

    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.
    Code:
    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.
    Code:
    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
     
    Harris and alwaysbusy like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice