TwwDataGrid.OnButtonClick not working?

Comments

3 comments

  • Roy Woll

    Its a bit confusing. The OnButtonClick event was intended for button's that are automatically created.  IFfyou drop in your own button, you can use the button's OnClick event instead.  The demo originally used an auto-created button, but later changed to a custom control button.  The demo however is not correct in that there is no code in its own OnClick event.

     

    0
    Comment actions Permalink
  • kyle

    You're right. I didn't notice the demo was using a CustomControl. I saw the button in the grid and the assigned TwwDataGrid.OnButtonClick assigned and assumed it was automatically created.

    I found out why the button event for my automatically created buttons does not fire. I have dgEditing turned off. I prefer it off because it's a grid for selecting an item and visually looks and behaves a little better when used with highlight row. By behaving, I mean the cursor doesn't enter into the cell.

    If I use a button as a custom control, the OnClick doesn't fire when dgEditing is off.

    No biggy. A dataset with allowing EnableDelete, EnableInsert, EnableUpdate turned off while leaving dgEditing on works too. I didn't expect dgEditing to disable all interaction with cells.

    Here's my usage... Read Only. User clicks Pricing or Inventory to jumped into those screens.

    0
    Comment actions Permalink
  • kyle

    My final resolution is close visually and behaviorally identical to dgEditing off. Set dgEditing on and set the columns to ReadOnly True. Close enough. It'll do.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk