TwwDataGrid.OnButtonClick not working?
I created a couple of unbound button columns and coded OnButtonClick event of the grid. The code never fired.
I loaded the Firepower main demo and set a break point on the datagrid controls demo form in its OnButtonClick event, but it never stopped.
Is it just my install (Firepower 184.108.40.206) or something else?
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.
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.
Please sign in to leave a comment.