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
Hi,
I used webcombo inside a grid. I have two questions with the webcombo.
The content of my webcombo is of this format: “Number…Describtion”. When you type some number in the webcombo, for example 123, if you type slowly, it works fine; if you type fast, you will see the combo status show “no result found”. At this time, tab or return key will not commit the changes you made to webcombo. See the image from the link below. How to fix that?
I want left and right arrow keys to be able to exit edit and commit changes to webcombo ( as return key). How to do that?
As “Attach file” does not work at your site, I upload my code here: Use Chrome if you cannot open the file.
Use Chrome if you cannot open the file.
https://docs.google.com/file/d/0B6PHgqLYYnxKbS1LMkF2bHU4ODQ/edit?usp=sharing
https://docs.google.com/file/d/0B6PHgqLYYnxKanhDZmZzcW1mUW8/edit?usp=sharing
Thanks,
Luwen
function WebCombo1_OnLostFocus(controlId) { var WebCombo1 = ISGetObject(controlId); if (!WebCombo1.ResultBox.isOpen) { WebCombo1.SetFocus(); WebCombo1.ShowDropDown(); } }
The solution does not work. I assume it is supposed to solve my first issue. My first issue is related to timing. It seems the combo find the matching result record, then it does another filtering and find no match. At this time, the selected value is lost. The focus is on the combo the whole time. My combo uses clientBinding and filtering. I override OnShowDropDown to do client side filtering.
My second issue is more urgent. Becuse the combo is used inside a grid, I need the right and left arrow key to be able to get the selected value of combo and exit the edit mode. How to do that ? For a dropdownbox, grid.ExitEdit() can keep the selected value. For a combo, the selected value is lost by using grid.ExitEdit().
Hello,Thank you for the reply.This time I use WebGrid client side event, “OnExitEditMode” event. In that event, I add validation code like in my prior post.Here’s the example code how I implement the validation code:
function WebGrid1_OnExitEditMode(controlId, tblName, editObject){ var WebGrid1 = ISGetObject(controlId); var WebCombo1 = ISGetObject("WebCombo1"); if (WebCombo1.ResultBox) { if (!WebCombo1.ResultBox.isOpen) { WebCombo1.SetFocus(); WebCombo1.ShowDropDown(); editObject.ToCellObject().Select(); return false; } } else { WebCombo1.SetFocus(); WebCombo1.ShowDropDown(); editObject.ToCellObject().Select(); return false; } }
I attached two samples regarding this workaround.The first one is the modified “testb” page. I add OnExitEditMode client side event.The second one is a simple sample about WebGrid with WebCombo within. I bind the WebGrid & WebCombo to access data source (Northwind database & Shippers table).You could download the sample from this link: http://sdrv.ms/HfABNGPlease kindly have review on the sample to see the result.Thank you for your help.Regards,Hans.
This solution does not work either. I uploaded a video. In the video, I kept typing 123, only some of changes were caught.
https://docs.google.com/file/d/0B6PHgqLYYnxKaENXNWVOVkM1cU0/edit?usp=drive_web
Hello,Thank you for the reply.The problem occurs due to the WebCombo haven’t had time to refresh or take the new result based on your new input. (That is default behavior from WebCombo).I have a workaround to give the WebCombo time to refresh or take the new result.I add validation code in OnEditKeyDown client side event of WebGrid. Here’s the example snippet code:
function WebGrid1_OnEditKeyDown(controlId){ var WebCombo1 = ISGetObject("WebCombo1"); var key = event.keyCode; if (key == '9' && WebCombo1.IsDirty) // If user press TAB key and the WebCombo have new input { if (WebCombo1.Text != WebCombo1.TextObj.value) { WebCombo1.HideDropDown(); } } }
You could download the sample regarding this workaroung from this link: http://sdrv.ms/HociNWRegards,Hans.
The above solution did not solve the problem, so we change the route. Yet we have the similar problem we discussed here.
We use the webcombo inside webdialogbox. There are Ok and Cancel buttons in the webdialog. After a value is selected in webcombo, you click OK button or hit enter key, the value is saved and webdialog box is closed. The OK button works well. But the enter key does not. If you key in some charactors and hit enter immediately, you got this message:"Microsoft JScript runtime error: 'rows[...].cells' is null or not an object"
I override webcombo'd onKeyDown event. Here is the code. How to wait till the combo finish refreshing? At least, how to catch the exception and avoid user seeing this error message?
Thanks
function comboLookup_OnKeyDown(controlId, keyCode) { if (keyCode == 13) { var combo = ISGetObject(controlId ) if (combo.IsDirty) { if (combo.Text != combo.TextObj.value) { combo.HideDropDown(); } } window.setTimeout(function () { saveClose(); }, 30); } }
Hello,Since this topic (WebCombo inside WebDialogBox) is the difference issue from the previous one, if you don’t mind, could you please create the new thread regarding this issue (WebCombo inside WebDialogBox)?In the new thread, could you please provide me the simple runnable that replicate the issue as well?So I can help you to find the solution for that issue.Thank you very much.Regards,Hans.
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