WebCombo focus issue

6 replies. Last post: December 20, 2010 1:31 AM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Frank BruceMember

when I have chosen a value of "WebComName" ,and then I enter keydown ,How can I focus on "WebComUnit" from "WebComName"    ???
Can you give me a demo ?thanks
(My code and picture below)

 JS 
function WebComName_KeyDown() { var WebComName = ISGetObject("WebComName"); var WebComUnit= ISGetObject("WebComUnit"); if (event.keyCode == 13) { WebComUnit.SetFocus(); } }

 WebComName                  
<ISWebCombo:WebCombo  ID="WebComName" runat="server" UseDefaultStyle="True" DataSourceID="SqlwebcomName"
                        Height="20px" Width="100px" DataTextField="fullname" DataValueField="fullname"
                        AllowWildCardSearch="true"  AdditionalSearchFields="fullname,employeecode"
                        TabIndex="1">
                        <Columns>
                            <ISWebCombo:WebComboColumn Width="60px" BaseFieldName="fullname" Name="fullname"
                                HeaderText="姓名" />
                            <ISWebCombo:WebComboColumn Width="60px" BaseFieldName="dept" Name="dept" HeaderText="职位" />
                            <ISWebCombo:WebComboColumn Width="60px" BaseFieldName="employeecode" Name="code"
                                HeaderText="编号" />
                        </Columns>
                        <LayoutSettings ComboMode="MultipleColumns" EntryMode="AutoComplete">                    
                        <ClientSideEvents  OnKeyDown="WebComName_KeyDown" />
                        </LayoutSettings>
                    </ISWebCombo:WebCombo>
                    <asp:SqlDataSource ID="SqlwebcomName" runat="server" ConnectionString="<%$ ConnectionStrings:db_CMSConnectionString %>"
                        SelectCommand="SELECT [employeecode], [fullname] , [dept]  FROM [tb_employee] where dept='进货员' ">
                    </asp:SqlDataSource>
                    

WebComUnit
<ISWebCombo:WebCombo ID="WebComUnit" runat="server" UseDefaultStyle="True" DataSourceID="SqlwebcomUnits"
                        Height="20px" Width="214px" DataTextField="fullname" DataValueField="fullname"
                        AllowWildCardSearch="true"
                        AdditionalSearchFields="fullname,linkman,unitcode" TabIndex="2">
                        <Columns>
                            <ISWebCombo:WebComboColumn Width="150px" BaseFieldName="fullname" Name="fullname"
                                HeaderText="公司" />
                            <ISWebCombo:WebComboColumn Width="60px" BaseFieldName="type" Name="type" HeaderText="类别" />
                            <ISWebCombo:WebComboColumn Width="60px" BaseFieldName="linkman" Name="linkman" HeaderText="联系人" />
                            <ISWebCombo:WebComboColumn Width="60px" BaseFieldName="unitcode" Name="unitcode"
                                HeaderText="编号" />
                        </Columns>
                        <LayoutSettings ComboMode="MultipleColumns" EntryMode="AutoComplete">
                        </LayoutSettings>
                    </ISWebCombo:WebCombo>
                    <asp:SqlDataSource ID="SqlwebcomUnits" runat="server" ConnectionString="<%$ ConnectionStrings:db_CMSConnectionString %>"
                        SelectCommand="SELECT [type], [fullname], [unitcode], [linkman] FROM [tb_units] where type='供货商'">
                    </asp:SqlDataSource>
1 attachment
All times are GMT -5. The time now is 9:36 AM.
Previous Next