altagur Posted February 26, 2013 Posted February 26, 2013 Because TUniDBGrid in this version lost key focus after data refreshing after grid.refresh and any any any actions, i need to set key focus to grid. How can I do this? I Try 1. Grids.SetFocus 2. Form.ActiveControl := Grids No any affects Is who know how set focus to the control in UNIGUI? Many thanks for help me. Gurow N V (aka altagur) Quote
Ronak Posted February 26, 2013 Posted February 26, 2013 procedure TFormList1.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings);begin UniDBGrid1.SetFocus;end; Quote
Asiaapollo Posted February 26, 2013 Posted February 26, 2013 I am using below workaround: procedure TFormList1.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin if EventName='load' then UniDBGrid1.SetFocus; end; Quote
altagur Posted February 26, 2013 Author Posted February 26, 2013 Thanks a lot. On KeyDown Event i am change query and close and open dataset connected to grid after than grid lost focus. I have a tree structure and then push enter i must go to the node and show child nodes like file structure in Norton Commander I press enter chclose open query and view child nodes but cant move thru grid by arrows because grid lost focus.I try to view any ajax event after refresh grid and Set focus. Quote
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.