LogSistemas01 Posted December 16, 2020 Share Posted December 16, 2020 Hello guys, I have this dbgrid where the MARGIN and PRECO columns are editable, when pressing ENTER in the edit above, the focus goes to the dbgrid in edit mode, when pressing ENTER in the MARGIN column, I would like you to move to the PRECO column already in edit mode and when pressing ENTER on PRECO, move to the next line in the MARGIN column in edit mode, does anyone know how to do it? ibb.co/gWMgRn5 Quote Link to comment Share on other sites More sharing options...
wsv01 Posted December 17, 2020 Share Posted December 17, 2020 If you are editing the MARGIN column and you press the Tab key, does focus more to the PRECO column? If so, does the Tab key kind of do what you want? Quote Link to comment Share on other sites More sharing options...
LogSistemas01 Posted December 17, 2020 Author Share Posted December 17, 2020 Yes, both are in edit mode. The tab key does what I want. But I would like you to do this same behavior with enter. And I have Editor in both Quote Link to comment Share on other sites More sharing options...
wsv01 Posted December 17, 2020 Share Posted December 17, 2020 Sorry, I tried all I could to get this to work. Maybe someone can help with JavaScript. I saw something like this in another thread. It looks like it would set focus to another field, but that is not what you are looking for. I'm wondering if something similar could be done by emulating a tab key press. if EventName='CarriageReturn' then UniEdit2.JSInterface.JSCall('focus',[]); Here is a link that talks about the same feature but with java script. Maybe someone can get this working for you. https://stackoverflow.com/questions/1009808/enter-key-press-behaves-like-a-tab-in-javascript Quote Link to comment Share on other sites More sharing options...
LogSistemas01 Posted December 24, 2020 Author Share Posted December 24, 2020 i did! On editors gridonKeyDown gridPrecos.CurrCol := gridPrecos.CurrCol - 1; gridPrecos.SetFocus; cdsPrecos.Edit; and gridPrecos.CurrCol := gridPrecos.CurrCol + 1; gridPrecos.SetFocus; cdsPrecos.Edit; Thanks! Quote Link to comment Share on other sites More sharing options...
wsv01 Posted December 24, 2020 Share Posted December 24, 2020 So glad you figured it out. I will have to remember how you did this. 1 Quote Link to comment Share on other sites More sharing options...
Fateh Bouchair Posted June 5, 2023 Share Posted June 5, 2023 I have de same probleme I try your solution but I dont undestand what is cdsPrecos.Edit; Quote Link to comment Share on other sites More sharing options...
Osama Ghazal Posted June 5, 2023 Share Posted June 5, 2023 2 hours ago, Fateh_Setif said: I have de same probleme I try your solution but I dont undestand what is cdsPrecos.Edit; cdsprecos, I think it is the ClientDataSet or the table or query Quote Link to comment Share on other sites More sharing options...
Fateh Bouchair Posted June 5, 2023 Share Posted June 5, 2023 الان فقط عرفتك استاذ اسامة انا تتبعتك على اليوتوت في سلسلة الفاست روبورت انا هنا ابحث على طريقة لاجعل unidbgrid in editmode when i enter in a colmun شكرا مسبقا 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.