Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

CLEAR method question

edited November 2020 in SRP EditTable Control
rv = Send_Message(grd_orders$, "OLE.Clear", 0)

The above method clears the text , but not the images or the promt:


Is this intentional?

Comments

  • I believe so.
    The clear method clears the table's data. CellImage and CellPrompt are different properties. To clear them you need to set the respective properties to null.
    It's extra work, but only two lines.

    Set_Property(grd_orders$, "OLE.CellPrompt[All; All]", "")
    Set_Property(grd_orders$, "OLE.CellImage[All; All]", "")
  • Set_Property(grd_orders$, "OLE.CellPrompt[All; All]", "")

    does not work. The prompt remains.
  • Hhhmmm, ok.
    Make it a space character?
  • instead of setting it to "", set it to " ". That does the trick.
  • "Hhhmmm, ok.
    Make it a space character?"

    yes, I will have to do that.
  • Thanks for jumping in @AusMarkB. Since CellPrompt is multi-valued, I treat "" to mean don't change. That is why you have to pass a SPACE character to make it go away.
Sign In or Register to comment.