Actually, you could do this 2 ways. One @ design and one @ run. What I did was:
Create a custom command button object (that would fit all the properties our app has (font, etc.)) and include the code in the click event of that object.
Once you've got that, go to the grid. Navigate,using the Properties form, down to the text control (I assume you want to remove it) in the column that you want to place the command button. Activate the form that contains the grid and press delete. The TextBox should be gone. Go to your form controls toolbar and select your command button (class library). Then click in the column where the textbox was. That should add that command button to that column.
If you do it at run-time it would be (maybe in the grid INIT or form INIT):
myForm.myGrid.Column1.removeobject("Text1" - if "Text1" is the name of the textbox in that column (I'm going from memory as I don't have the system here in front of me).
myFOrm.myGrid.Column1.addobject("myCommandButton"
3) Select your grid, right click, and choose EDIT. Click on the column you want to add the control to, then press CTRL+V.
The control should then appear in your column. The TextBox will still be there, however, so you should either delete the TextBox or set the column's CurrentControl property to the new control so the grid will use it.
Another way
- Right click in the grid
- Choose Modify
- Now choose the button command from the form controls toolbar
- Click on the column you want to add the button command
Now go to that column's properties and change CurrentControl property for that column.
The interesting about this is that you can add as many controls as you want (buttons, spinners, GRIDS, edit boxex, and so on)
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.