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
I have a WebGridColumn with EditType="WebComboNet" with a DataMember="PART_NUM". The WebCombo has EntryMode="AutoComplete" and ComboMode="MutipleColumns" of PART_NUM and PART_DESCRIPTION.
Is it possible to easily get the PART_DESCRIPTION when an Item is Selected in the WebCombo and populate another WebGridColumn?
When I implemented this without a WebGrid, it became very complicated to do this primarily because of timing issues caused by loading over 10,000 items into the WebCombo, albeit only 100 or less at a time. If the User types in the WebCombo rather than selecting from the Drop Down, the User can Tab off the WebCombo before it is finished loading. I am hoping things are easier with a WebGrid.
I have use a conditional checking so the LoadValue will only be invoke if the TextBoxValue and element value is different. However using the steps in your previous post, this block will not be executed and the GetRowSelected method will return null.
In order to resolve this issue just comment out the conditional logic for the LoadValue
//if (editObject.element.GetTextBoxValue() != editObject.element.Value)//{editObject.element.Value = editObject.element.GetTextBoxValue();editObject.element.LoadValue(true);//}
I will need to discuss this issue with our developer. We will inform you if there is any update or progress regarding this issue.
Please use the attached sample as a basis.
I want to populate ProductName_WebGridColumn with the [ProductName] when ProductID_WebGridColumn's WebCombo's value changes, selected.
You could use the ExitEditMode client side event handler to fill in the ProductName cell. Here is the snippet:
function OrderDetails_WebGrid_OnExitEditMode(controlId, tblName, editObject){ var wg = ISGetObject(controlId); var cellObj = editObject.ToCellObject(); if (cellObj.Name == "ProductID_WebGridColumn") { if (editObject.element.IsInProgress) { editObject.ToCellObject().Select(true, true); return false; } else { if (editObject.element.GetSelectedRow() != null) { cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetText(editObject.element.GetSelectedRow().cells[1].innerText); cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetValue(editObject.element.GetSelectedRow().cells[1].innerText); } } } return true;}
The IsInProgress conditional check is used if the WebCombo is still in the process of auto completing the inputed text.
Hi,
We are getting closer.
Most the time the user knows what the Part Number is and does not need to look in the Drop Down. Also, the Part Number may not be in the Drop Down but we do not want to limit the User to the Drop Down as the Part Number they need is not in the database yet.
This works fine if the User Waits before pressing the Tab Key.
However as explained before, "If the User types in the WebCombo rather than selecting from the Drop Down, the User can Tab off the WebCombo before it is finished loading."
To Reproduce Timing issue:
Results:
- Product Name is not loaded
The symptoms are the same in IE, Mozilla, Chrome and Safari
Any other ideas?
Doug
You could try checking the TextBoxValue of the WebCombo and try to load the selected item from the TextBoxValue. Here is the snippet:
function OrderDetails_WebGrid_OnExitEditMode(controlId, tblName, editObject){ var wg = ISGetObject(controlId); var cellObj = editObject.ToCellObject(); if (cellObj.Name == "ProductID_WebGridColumn") { if (editObject.element.IsInProgress) { editObject.ToCellObject().Select(true, true); return false; } else { if (editObject.element.GetTextBoxValue() != editObject.element.Value) { editObject.element.Value = editObject.element.GetTextBoxValue(); editObject.element.LoadValue(true); } if (editObject.element.GetSelectedRow() != null) { cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetText(editObject.element.GetSelectedRow().cells[1].innerText); cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetValue(editObject.element.GetSelectedRow().cells[1].innerText); setTimeout(function() { cellObj.GetRow().GetCell('ProductID_WebGridColumn').SetText(editObject.element.GetSelectedRow().cells[0].innerText); cellObj.Get Row().GetCell('ProductID_WebGridColumn').SetValue(editObject.element.GetSelectedRow().cells[0].innerText); }, 5); } else { cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetText(""); cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetValue(""); } } } return true;}
You will also need to set the ProductID column to the textbox value because under certain condition the Value is not updated with the TextBoxValue.
That seems to be working. I will do more testing.
This is a lot easier than what I had came up with for when the WebCombo was standalone.
http://www.intersoftpt.com/Community/WebCombo/How-do-I-wait-for-the-DropDown-to-be-loaded-in-the-WebCombo-Client-Side-OnBlur-Event/
I ended up doing a SendCustomRequest so I could monitor it's completion. I had tried the LoadValue but I think I ran into the problem where the ProductID was not updated.
Thanks,
I found a problem.
I a guessing this is because the JavaScript is checking to see if a Row is Selected. Since the Drop Down never occurred, the Load never occurred so a row was never selected.
I do want to blank out the Product Name when the User types in something not in the List, such as "78" or "".
You are correct, the snippet for OnExitEditMode event handler logic will set the ProductName cell value to empty if the inserted ProductId is not on the list. I highlighted the responsible line that will set the ProductName value if the ProductId is not in the list.
function OrderDetails_WebGrid_OnExitEditMode(controlId, tblName, editObject){ var wg = ISGetObject(controlId); var cellObj = editObject.ToCellObject(); if (cellObj.Name == "ProductID_WebGridColumn") { if (editObject.element.IsInProgress) { editObject.ToCellObject().Select(true, true); return false; } else { if (editObject.element.GetTextBoxValue() != editObject.element.Value) { editObject.element.Value = editObject.element.GetTextBoxValue(); editObject.element.LoadValue(true); } if (editObject.element.GetSelectedRow() != null) { cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetText(editObject.element.GetSelectedRow().cells[1].innerText); cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetValue(editObject.element.GetSelectedRow().cells[1].innerText); setTimeout(function() { cellObj.GetRow().GetCell('ProductID_WebGridColumn').SetText(editObject.element.GetSelectedRow().cells[0].innerText); cellObj.GetRow().GetCell('ProductID_WebGridColumn').SetValue(editObject.element.GetSelectedRow().cells[0].innerText); }, 5); } else { cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetText(""); cellObj.GetRow().GetCell('ProductName_WebGridColumn').SetValue(""); } } } return true;}
Feel free to modify them to fit your scenario.
I guess you didn't reproduce the problem with the steps from my previous post.
I was describing when the Product Number Value is in the Database and just going into EditMode on the WebCombo leads to the Product Name Value being Set to an Empty String without Changing the Value in the WebCombo.
It is OK to Set the Product Name Value to an Empty String if it is not in the Database but it is NOT OK to Set the Product Name Value to an Empty String it if it is in the Database
STEPS TO REPRODUCE:
You can test it with the instructions from my previous post or try this:
PROBLEM:
"1" is a valid Product Number yet it in the above scenario, in Step 5, the Product Name Column Value is Set to an Empty String.
How can this problem be corrected?
That fixed it.
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