CristianPeta Posted October 19, 2020 Share Posted October 19, 2020 It is possible to programmatically select a Column in a uniDBGrid? I need to show a grid of images an select a specific one. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2020 Share Posted October 19, 2020 14 minutes ago, CristianPeta said: It is possible to programmatically select a Column in a uniDBGrid? I need to show a grid of images an select a specific one. Hello, Can you please explain in more details? Quote Link to comment Share on other sites More sharing options...
CristianPeta Posted October 19, 2020 Author Share Posted October 19, 2020 I have a grid of images and with uniDBGrid I can select a row by changing dataset cursor but I don't see how to select programmatically one specific cell in that row. For VCL I can do like this: DBGrid.SelectedField := DBGrid.DataSource.DataSet.FieldByName('Value') Quote Link to comment Share on other sites More sharing options...
CristianPeta Posted October 19, 2020 Author Share Posted October 19, 2020 Here I need it for an other purpose but for me it would be strange this can't be done because I thought this is a common thing if someone want to create a list of articles and after selecting and adding one in the list then it would be useful to automatically select Qty column and activate editing so the user can faster change Qty by typing only the number. At least I use this frequently in my Vcl apps. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2020 Share Posted October 19, 2020 1 hour ago, CristianPeta said: DBGrid.SelectedField := DBGrid.DataSource.DataSet.FieldByName('Value') One possible solution: UniDBGrid.CurrCol := UniDBGrid.ColumnByName('Value').Index; 1 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.