artem_niko Posted January 22, 2020 Share Posted January 22, 2020 Hello! Need get field name of selected column in UniDBGrid at just moment, uses mouse. I mean, for example, in UniDBGrid exist Column='MyField' and when I making double click colomn, I must get name of select column. May be, exist something property as UniDBGrid.SelectedField (as in DBGridEh, from Ehlib components). Is it possible? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2020 Share Posted January 22, 2020 55 minutes ago, Артем said: I mean, for example, in UniDBGrid exist Column='MyField' and when I making double click colomn, I must get name of select column. Hello, Do you mean double click on the column header? Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 22, 2020 Author Share Posted January 22, 2020 20 minutes ago, Sherzod said: Hello, Do you mean double click on the column header? No, not in column header. I need get field name of column when click (or double click) in cell of column. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2020 Share Posted January 22, 2020 6 minutes ago, Артем said: I need get field name of column when click (or double click) in cell of column. Well, for example like this: procedure TMainForm.UniDBGrid1DblClick(Sender: TObject); begin ShowMessage(UniDBGrid1.Columns[UniDBGrid1.CurrCol].FieldName); end; 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 22, 2020 Author Share Posted January 22, 2020 Perfect! Excellent! Thank you, @Sherzod Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.