If I define a column as type ctButton they show up in all rows. Turns out I only want buttons in every third row. How do I do this? How would I, for example, set button objects to Enable := False and Visible := False, assuming this is one way to accomplish this?
Or, alternately, how do I define the column type otherwise and dynamically drop buttons in the cells I want them?
I've resolved my problem by changing the column to type ctNormal and setting MouseSelect to SingleCell, but I'd still like to know if you can use ctButton and disable the buttons in some rows.
Hi,
Thanks, Bart. This is what I was looking for. Will try it out.
Bart, the description of this event says it is triggered by the rendering of each grid cell, yet in my app it doesn't get triggered until Row 24, too late for my purposes. How do I force the render for each row at least, if not each cell?
As I suspected because Row 24 is, in fact, the end of the page. At that point it is too late. I need to set the "column type" for each cell as they are being created/filled. I guess I'll try resetting all the cells from Row 0 to n (in this case 24) from that one event and see if that works.
Resolved. I now see the event for each cell using the code below. Since the number of rows per "table entry" is not regular I find the rows by having first stored a text string in the cells I want to convert to ctButton. Thanks for the help.