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
<%@ Page Title="" Language="C#" MasterPageFile="~/Branding/MasterPageNewCoSimple.master" AutoEventWireup="true" CodeFile="ComboBoxInterSoft.aspx.cs" Inherits="Refurb_ComboBoxInterSoft" %>
<%@ Register assembly="ISNet.WebUI.WebCombo" namespace="ISNet.WebUI.WebCombo" tagprefix="ISWebCombo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphBody" Runat="Server">
<script language="javascript" type="text/javascript">
function PartNumber_WebCombo_OnLostFocus(controlId) {
var PartNumber_WebCombo = ISGetObject(controlId);
var PartNumber_TextBox = document.getElementById("<%= PartNumber_TextBox.ClientID %>");
var PartDescription_TextBox = document.getElementById("<%= PartDescription_TextBox.ClientID %>");
PartNumber_TextBox.value = PartNumber_WebCombo.GetTextBoxValue();
// TODO: Wait for DropDown to load
PartDescription_TextBox.value = PartNumber_WebCombo.Value;
return true;
}
</script>
<table>
<tr>
<td>
<ISWebCombo:WebCombo
ID="PartNumber_WebCombo"
runat="server"
DataSourceID="PartsList_SqlDataSource"
DataTextField="PART_NUM"
DataValueField="DESCRIPTION"
UseDefaultStyle="true"
Height="20px"
Width="200px"
>
<Columns>
<ISWebCombo:WebComboColumn BaseFieldName="PART_NUM" HeaderText="Part#" Name="ContactName" Width="150px" />
<ISWebCombo:WebComboColumn BaseFieldName="DESCRIPTION" HeaderText="Description" Name="Description" Width="455px" />
</Columns>
<LayoutSettings
ComboMode="MultipleColumns"
EntryMode="AutoComplete"
AllowAddItem="true"
<ClientSideEvents
OnLostFocus="PartNumber_WebCombo_OnLostFocus"
/>
</LayoutSettings>
</ISWebCombo:WebCombo>
</td>
<asp:RequiredFieldValidator
ID="PartNumber_WebCombo_RequiredFieldValidator"
ControlToValidate="PartNumber_WebCombo"
Text="*"
ErrorMessage="*Please enter a Part."
Enabled="true"
Display="Static"
Visible="true"
<asp:TextBox ID="PartNumber_TextBox" runat="server"></asp:TextBox>
<asp:TextBox ID="PartDescription_TextBox" runat="server"></asp:TextBox>
</tr>
</table>
<asp:SqlDataSource
ID="PartsList_SqlDataSource"
ConnectionString="<%$ ConnectionStrings:NewCoApp %>"
SelectCommand="SELECT [PART_NUM], [DESCRIPTION] FROM [PARTS_LIST] ORDER BY [PART_NUM]"
></asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphFooter" Runat="Server">
Since you could not enter the TDN, I will attached the latest WebCombo and WebUI Framework.
I have done some further testing with no success yet.Scenario 1:
- Type in a Value which is in the List but not Loaded yet
- Tab to the next Input before the Combo starts Loading
Here are the Events
-- OnLostFocus Completes-- OnBeforeRequest-- OnActionDispatched: LoadData-- OnAfterResponseProcess
Hence, the List is not Loaded with the New Value for the OnLostFocus Event
Scenario 2:
- Type a Value in which is in the List but not Loaded yet
- Wait for the List to Load
- Tab to the next Input
-- OnBeforeRequest-- OnActionDispatched: LoadData-- OnAfterResponseProcess-- OnAfterItemSelected-- OnLostFocus_End
Now, the WebComboRow Cells can be accessed.
Attempted Workaround:
In the OnLostFocus Event I tired a SetText(...) and LoadValue(true) but can not get the LoadValue to run Snychronously.How do I get LoadValue to run Snychronously?
Sample Code:
var PartNumber_WebCombo_Processing_Page = false;
function LogEvent(Event) {
var Log_TextBox = document.getElementById("<%= Log_TextBox.ClientID %>");
Log_TextBox.value = Log_TextBox.value + "\r\n" + Event ;
function PartNumber_WebCombo_OnActionDispatched(controlId, action) {
LogEvent("PartNumber_WebCombo_OnActionDispatched" + ": " + action);
function PartNumber_WebCombo_OnAfterItemSelected(controlId) {
LogEvent("PartNumber_WebCombo_OnAfterItemSelected");
function PartNumber_WebCombo_OnAfterResponseProcess(controlId) {
LogEvent("PartNumber_WebCombo_OnAfterResponseProcess");
PartNumber_WebCombo_Processing_Page = false;
function PartNumber_WebCombo_OnBeforeRequest(controlId) {
LogEvent("PartNumber_WebCombo_OnBeforeRequest");
PartNumber_WebCombo_Processing_Page = true;
if (PartNumber_WebCombo.IsInProgress) {
LogEvent(IsInProgress);
if (PartNumber_WebCombo.IsMoreRequest) {
LogEvent(IsMoreRequest);
function PartNumber_WebCombo_OnChanged(controlId) {
LogEvent(PartNumber_WebCombo_OnChanged);
var PartNumber_String = PartNumber_WebCombo.GetTextBoxValue();
var PartDescription_String = "";
LogEvent(PartNumber_WebCombo.GetLastAction());
// PartNumber_WebCombo.SetText(PartNumber_String, true);
// PartNumber_WebCombo.LoadValue(true);
LogEvent(PartNumber_WebCombo.Value);
// LogEvent(PartNumber_WebCombo.GetLastAction());
if (false) {
PartDescription_String = PartNumber_WebCombo.Value;
else {
if (PartNumber_WebCombo_Processing_Page) {
LogEvent("PartNumber_WebCombo_Processing_Page");
var Selected_WebComboRow = PartNumber_WebCombo.GetSelectedRow();
if (Selected_WebComboRow != null) {
PartDescription_String = Selected_WebComboRow.cells[1].innerText;
PartNumber_TextBox.value = PartNumber_String
PartDescription_TextBox.value = PartDescription_String
LogEvent("PartNumber_WebCombo_OnLostFocus_End");
<td valign="top">
DataValueField="PART_NUM"
Value="800010194001"
OnAfterResponseProcess="PartNumber_WebCombo_OnAfterResponseProcess"
OnBeforeRequest="PartNumber_WebCombo_OnBeforeRequest"
OnActionDispatched="PartNumber_WebCombo_OnActionDispatched"
OnAfterItemSelected="PartNumber_WebCombo_OnAfterItemSelected"
<asp:TextBox
ID="Log_TextBox"
Height="500px"
Width="400px"
TextMode="MultiLine"
Font-Size="8pt"
Font-Names="Verdana"
BorderColor="#CCCCCC"
BorderWidth="1px"
</asp:TextBox>
Based on your analysis and scenario, perhaps we could use AfterItemSelected client side event and during the event we will trigger a custom flypostback event in order to query the data and set the value to the textbox.
Attached is a simple sample of the above suggestion.
Hi,
1. There are a couple problems with AfterItemSelected.
- It does not always occur
--- Empty String
--- Not it the list
- If it does occur, no reason to wait for the LoadData Action because the list is already loaded
2. I did try playing withe SendCustomRequest, but it had to wait for the LoadData. Where do I find some docs on AddInput Method?
3. How do I get the LoadValue(true) Method to execute synchrnously? It isn't working for me.
Doug
We have some documentation regarding AddInput on WebUIFramework documentation in the article titled Walkthrough: Sending data to server using OnTheFlyPostBack architecture
The LoadValue(true) method will not execute synchronously in the latest released build. This will be fix in the next hotfix build.
It seems like OnTheFlyPostBack is async, so I would still have the same problem.
4. When might the next hotfix build be available for LoadValue(true)?
5. Will I be able to apply it to the trial version? I would like to know it works before I buy it.
I have noticed, the AddItem Action takes place, but the LoadData Action only takes place if what is typed is going to be in the List.
6. So, currently is there anyway to determine if a LoadData Action, will or will not take place or if async processing is complete?
The next hotfix is scheduled to be released in the next two week at the latest. The trial version is elegible for the update, however you will need to do the update manually and wait the download link to be provided by the customer support.
I am still discussing the solution for the asynchronous process in your scenario with the developer.
After discussing this matter with the developer, our suggestion for the scenario you are facing is to use the InstantLookup entry mode. This mode will ensure that the AfterItemSelected will be called during Adding or Searching existing item. A sample of InstantLookup mode has been provided on the EntryMode_InstantLookup.aspx page in the WebCombo sample.
Will this be a favorable solution for your scenario?
I tried it but it has some draw backs.
The Lookup only takes place on Enter, Lost Focus or Click on DropDown. I need it after every keystroke.
Typing Text in causes the DropDown to Close.
It also seems be having conflicts with my ClientSideEvents.OnLostFocus.
Is the hotfix available for the LoadValue(true) problem not working synchronously?
I see there is a SP1 Refresh that came out today.
Thanks,
The LoadValue(true) function will be available in the release hotfix today. The InstantLookup mode will only lookup item when the user leave the textbox, by using the Enter key, LostFocus, or clicking the dropdown icon, it will not be available after every keystroke.
This mode will also solve the fast typer scenario you are having in the earlier post.
I am not sure about the conflict you are having in the LostFocus, perhaps if you could give us the snippet of the function we could help you solve the issue.
How do I get the Hotfix for the Trial Version since I can not get into the Developer Network?
I would like to try it to see if it clears up my problems.
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