iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Good morning support,
I have a question:
I read the document with 'WebGrid.NET supports standard keystrokes' but I don't find (using only the keystrokes) how exit from WebGrid component to move the focus on the another component in the asp page, because also if I exit from edit mode, I'm not able to release the focus from grid by keystrokes
May you help me ?
thanks in advanced
Fabrizio
Hi Fabrizio,
Yes, that would be a default behavior of our WebGrid. We will need to handle this manually. Attached is a sample to handle that scenario. Please kindly take a look and give me a feedback regarding that. Also, I am using Northwind as a database.
In my sample, I have also managed for both options, on cell select and on cell edit mode. Both of them, will be automatically go to the next first row of the second WebGrid component.
I hope it can help. Thank you and have a nice day.
Best Regards,
Andi Santoso
In order to use the keystrokes to lost focus from WebGrid and set focus to other component in asp page, we can use OnKeyDown client side event of a WebGrid. Here is a snippet to set the focus to other component, i.e a simple TextBox, with a "tab" button.
function WebGrid1_OnKeyDown(controlId, tblName, rowIndex, cellIndex) { var grid = ISGetObject(controlId); var getSelectedObject = grid.GetSelectedObject().ToRowObject(); if (getSelectedObject.cells == null) { if (event.keyCode == "9") { var textbox = document.getElementById("TextBox1"); textbox.focus(); } } }
However, since I am using a tab button, which can be used to change to the next cell during an editing, we will need to make an exception in here. After we have done or exit from edit mode and press tab, it will set focus to text box in asp page.
I hope it can help and please do not hesitate to ask if you have any other questions. Thank you and have a nice day.
Andy thanks for you answer.
I would like to know why if I navigate between cells with tab, when arrive to last cell of last row , the tab doesn't go to the next component but the focus stuck there.
Forgive me, however, I am not able to replicate your issue. I have tried to press tab button when it arrives at the last cell and eventually, it will go to the next row.
May I know your WebGrid's version and build please? Also, please ensure that you are using the lates build of WebGrid. Thank you and have a nice day.
Hi Andy,
the version of WebGrid is 7.0.7200.402
Probably is not clear what I wrote. Example if I have two webGrids, when with tab arrive on the last cell (in the last row) of first grid, according to me when hit tab key, the focus should move on the next component (the second grid).
Let me know what do you thinks about it
kind regards
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname