TDBAdvGrid columns with buttons for view and print

Hi,


I am using a TDBAdvGrid  (pageMode = True) to display data from a query.  I don't want to allow direct editing in the grid but in a pop up form, I also have the requirement to print an individual record.  I want to add two columns to the grid with buttons to click on to either print the current record or bring up the edit form for the current record.

I have added the columns to the grid and tried to use the HTML Template to show an image <IMG src="0"> and set the columns[11].images to an image list (16x16) but it doesn't show anything in the grid (though text does display).  I was then going to use the OnCellClick event to print or view the current record.

Am I going about this the right way?  I would rather have a button to click rather than an image but I didn't see an obvious way to do this but I think if I can get the image showing it will suffice.

Thanks

Steve

If you use an imagelist, the correct syntax to instantiate image 0 of the assigned imagelist  grid.GridImages would be <IMG src="idx:0">

With PageMode = true, the best solution is indeed to use an image and handle OnCellClick. From this OnCellClick, the active record in the DB should point to the selected record in the grid.