Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TForm2.DBGrid1MouseDown(Sender: TObject; Button: TMouseButton;
- Shift: TShiftState; X, Y: Integer);
- var
- Col,
- Row : Integer;
- begin
- Col := DBGrid1.MouseCoord(X, Y).X;
- Row := DBGrid1.MouseCoord(X, Y).Y;
- if (dgIndicator in DBGrid1.Options) then
- Dec(Col);
- if (Col >= 0) and (Col < DBGrid1.Columns.Count) and (Y < DBGrid1.DefaultRowHeight) then
- if Button = mbRight then
- begin
- case DBGrid1.Columns[Col].Title.Caption of
- 'SURNAME':
- showmessage('cliccato sur');
- 'STUDENT_NO':
- showmessage('cliccato sutdent no');
- 'FORENAME':
- showmessage('worka, wow');
- end;
- //Caption := DBGrid1.Columns[Col].Title.Caption
- end
- else
- Caption := '';
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement