Board index » delphi » Disabling columns in grid[solution]
g...@perth.DIALix.oz.au (Graphics and Technical Systems)
![]() Delphi Developer |
Mon, 06 Jul 1998 03:00:00 GMT
Disabling columns in grid[solution]
I have at last found how to achieve the effect I wanted regarding "disabling"
grid cells at run time. I didn't get any responses to my earlier postings so either you're all dumber than I am or I'm so dumb nobody deigned to inform me of the obvious answer. The solution was found in the FAQ on ftp.borland.com - will wonders never cease! Any way for anybody who mave have a similar problem, here's the solution. Kym Wilson The event which is triggered when a new row is selected in a grid is the Hence I insert code into both the grid's ONCOLUMNENTER event (to procedure Ttfdepth.DataSource1DataChange(Sender: TObject; Field: TField); procedure Ttfdepth.dbgrid1colenter(Sender: TObject); {move to next cell on right} dbgrid1.selectedindex:=dbgrid1.selectedindex+1; {move to next cell on left} dbgrid1.selectedindex:=dbgrid1.selectedindex-1 There is a slight problem with this in that moving cells with the mouse |