This is a migrated thread and some comments may be shown as answers.

cannot get selected value if load on demand with same display text

2 Answers 155 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
CH
Top achievements
Rank 1
CH asked on 18 Oct 2010, 08:52 AM
Dear Expert:
    I have a project with some combo box inside the panelbar. i follow the sample of "load on demand" from telerik webside , the user will type partial of the client name and it will return the matched client Name, Client ID  and description. it works for almost of the case, except if the return of the client Name are the same (but with different Client ID). if the returned client name are the same then i clicked the submit button and the combo box cannot return the client ID to the server side (the text on the combo is able to get).
i tried so many time and one more thing which i found.... if i put the datetime string to make the returned client name are different then i can get the client ID from the server side. please kindly to give me some solution! thks!

i used the telerik verion 2010.1.415.20 and VS 2010

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="STEPS_Pages_CommonPages_Main" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server" >
    <title>STEPS II (Beta)</title>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <link href="~/css/common2.css" type="text/css" rel="stylesheet"/>    
    <style type="text/css">  
    html, body, form  
    {  
        height: 100%;  
        margin: 0px;  
        padding: 0px;  
        overflow: hidden;  
    }  
    </style>  
      
  
</head>
<script type="text/javascript" language="javascript">
    function mnuClientNew_onClientClick(sender, eventArgs) {
        var itemValue = eventArgs.get_item().get_value();
        if (itemValue == "Contact") {
  
        } else if (itemValue == "Company") {
  
        } else if (itemValue == "Brand") {
  
        } else if (itemValue == "Agent") {
  
        }
  
    }
  
    //        function barMenuLeft_OnClientItemClicked(sender, eventArgs){
    //            
    //             var itemValue = eventArgs.get_item().get_value();
    //             var frameStock = document.getElementById("frameStock");
    //             var tabMenuTop = $find( "<%= tabMenuTop.ClientID %>");
    //             var tabStock = tabMenuTop.findTabByText("Stock");
    //             if (itemValue == "Stock_Favourite"){
    //                tabStock.select();
    //                frameStock.src = "./Main_Detail_Panel.aspx?AccessForm=Stock&Action=Search_Favourite&EmployeeId=" + "<%= this.employeeId %>"
    //             }
    //        }
  
    function showMyList(form, action) {
  
        var frameStock = document.getElementById("frameStock");
        var tabMenuTop = $find("<%= tabMenuTop.ClientID %>");
        var tabStock = tabMenuTop.findTabByValue("Stock");
        var tabClient = tabMenuTop.findTabByValue("Client");
        if (form == 'Client') {
            if (action == "Favourites") {
  
            } else if (action == "Access History") {
  
            }
        } else if (form == 'Stock') {
            if (action == "Favourites") {
                tabStock.select();
                frameStock.src = "./Main_Detail_Panel.aspx?AccessForm=Stock&Action=Search_Favourite&EmployeeId=" + "<%= this.employeeId %>" + "&SessionTime=" + "<%= this.sessionTime %>"
            } else if (action == "Access History") {
  
            }
        }
  
    }
  
    function setTabTitle(tabValue, tabName) {
        var tabMenuTop = $find("<%= tabMenuTop.ClientID %>");
        var tab = tabMenuTop.findTabByValue(tabValue);
        tab.set_text(tabName);
    }
  
    function Resize() {
        var frameClient = document.getElementById("frameClient");
        frameClient.style.height = screen.availHeight - 200;
        var frameStock = document.getElementById("frameStock");
        frameStock.style.height = screen.availHeight - 200;
        var frameInvoice = document.getElementById("frameInvoice");
        frameInvoice.style.height = screen.availHeight - 200;
    }
  
    function cboClientName_OnClientItemsRequesting(sender, eventArgs) {
        if (eventArgs.get_text().length < 3)
            eventArgs.set_cancel(true)
        else {
            eventArgs.set_cancel(false);
            var barMenuLeft = $find("<%= barMenuLeft.ClientID %>");
            var clientItem = barMenuLeft.findItemByValue("Client");
            var clientExpressItem = barMenuLeft.findItemByValue("Client_Express");
            //var clientExpressSearchItem  = barMenuLeft.findItemByValue("Client_Express_Search");
            var rdoAll = $telerik.findElement(clientExpressItem.get_element(), "rdoClientAll");
            var rdoContact = $telerik.findElement(clientExpressItem.get_element(), "rdoClientContact");
            var rdoCompany = $telerik.findElement(clientExpressItem.get_element(), "rdoClientCompany");
            var rdoBrand = $telerik.findElement(clientExpressItem.get_element(), "rdoClientBrand");
            var rdoAgency = $telerik.findElement(clientExpressItem.get_element(), "rdoClientAgency");
  
            var txtPhone = $telerik.findElement(clientExpressItem.get_element(), "txtClientPhone");
            var txtVehicleNumber = $telerik.findElement(clientExpressItem.get_element(), "txtClientVehicleNumber");
            var txtEmail = $telerik.findElement(clientExpressItem.get_element(), "txtClientEmail");
            var dpBirthdayFr = clientExpressItem.findControl("dpClientBirthdayFr");
            var dpBirthdayTo = clientExpressItem.findControl("dpClientBirthdayTo");
            var chkShowAllAsso = $telerik.findElement(clientExpressItem.get_element(), "chkShowAllAsso");
  
            var context = eventArgs.get_context();
            if (rdoAll.checked) {
                context["ClientType"] = "All";
            } else if (rdoContact.checked) {
                context["ClientType"] = "Contact";
            } else if (rdoCompany.checked) {
                context["ClientType"] = "Company";
            } else if (rdoBrand.checked) {
                context["ClientType"] = "Brand";
            } else if (rdoAgency.checked) {
                context["ClientType"] = "Agency";
            }
  
            //             if (txtPhone.value != ""){
            //                context["Phone"] = txtPhone.value;
            //             }
            //             
            //             if (txtVehicleNumber.value != ""){
            //                context["VehicleNumber"] = txtVehicleNumber.value;
            //             }
            //             
            //             if (txtEmail.value != ""){
            //                context["Email"] = txtEmail.value;
            //             }
            //             
            //             if (!dpBirthdayFr.isEmpty()){
            //                context["BirthdayFr"] = dpBirthdayFr.get_selectedDate();
            //             }
            //             
            //             if (!dpBirthdayTo.isEmpty()){
            //                context["BirthdayTo"] = dpBirthdayTo.get_selectedDate();
            //             }
  
            if (chkShowAllAsso.checked) {
                context["IsShowAllAsso"] = "1";
            }
        }
    }
  
    function toggle(link, divId) {
        var lText = link.innerHTML;
  
        var d = document.getElementById(divId);
        if (lText == '+') {
            link.innerHTML = '−';
            d.style.display = 'block';
        } else {
            link.innerHTML = '+';
            d.style.display = 'none';
        }
  
    }
  
    function cboClientName_keyPressHandler(sender, args) {
  
        if (args.get_domEvent().keyCode == 13) {
  
            var barMenuLeft = $find("<%= barMenuLeft.ClientID %>");
            var clientItem = barMenuLeft.findItemByValue("Client");
            var clientExpressItem = barMenuLeft.findItemByValue("Client_Express");
            //var clientExpressSearchItem  = barMenuLeft.findItemByValue("Client_Express_Search");
  
            var searchBtn = $telerik.findElement(clientExpressItem.get_element(), "btnClientSearch");
            if (searchBtn) {
                searchBtn.click();
            }
        }
    }
  
  
    var stockMode = "Advanced";
    function showHideStkSearch() {
  
        var barMenuLeft = $find("<%= barMenuLeft.ClientID %>");
        var stockItem = barMenuLeft.findItemByValue("Stock");
        var stockExpressItem = barMenuLeft.findItemByValue("Stock_Express");
        //var stockExpressSearchItem  = barMenuLeft.findItemByValue("Stock_Express_Search");
        var refStkAdvanced = $telerik.findElement(stockExpressItem.get_element(), "refStkAdvanced");
        //var trStkFloorArea = $telerik.findElement(stockExpressItem.get_element(), "trStkFloorArea");
        var trStkActive = $telerik.findElement(stockExpressItem.get_element(), "trStkActive");
        //var trStkPrice = $telerik.findElement(stockExpressItem.get_element(), "trStkPrice");
        var trStkFunction = $telerik.findElement(stockExpressItem.get_element(), "trStkFunction");
        var trStkLastEdit = $telerik.findElement(stockExpressItem.get_element(), "trStkLastEdit");
        var trStkCommerce = $telerik.findElement(stockExpressItem.get_element(), "trStkCommerce");
        var trStkExpiry = $telerik.findElement(stockExpressItem.get_element(), "trStkExpiry");
        var trStkMarketPrice = $telerik.findElement(stockExpressItem.get_element(), "trStkMarketPrice");
        var trStkSize = $telerik.findElement(stockExpressItem.get_element(), "trStkSize");
        if (stockMode == "Advanced") {
            stockMode = "Simple";
            refStkAdvanced.innerHTML = "Simple";
            //trStkFloorArea.style.display = "inline";
            trStkActive.style.display = "inline";
            //trStkPrice.style.display = "inline";
            trStkFunction.style.display = "inline";
            trStkLastEdit.style.display = "inline";
            trStkCommerce.style.display = "inline";
            trStkExpiry.style.display = "inline";
            trStkMarketPrice.style.display = "inline";
            trStkSize.style.display = "inline";
            ResizePane(200, "<%= sptMain.ClientID %>", "<%= pnlLeft.ClientID %>");
        } else {
            refStkAdvanced.innerHTML = "Advanced";
            //trStkFloorArea.style.display = "none";
            trStkActive.style.display = "none";
            //trStkPrice.style.display = "none";
            trStkFunction.style.display = "none";
            trStkLastEdit.style.display = "none";
            trStkCommerce.style.display = "none";
            trStkExpiry.style.display = "none";
            trStkMarketPrice.style.display = "none";
            trStkSize.style.display = "none";
            ResizePane(-200, "<%= sptMain.ClientID %>", "<%= pnlLeft.ClientID %>");
        }
    }
  
    function ResizePane(size, splitterID, paneID) {
        var splitter = $find(splitterID);
        var pane = splitter.getPaneById(paneID);
        if (!pane) return;
        pane.resize(size);
    }
  
    function cboStkLocation_OnClientSelectedIndexChanged(sender, args) {
        var selLocation = sender.get_value()
        var barMenuLeft = $find("<%= barMenuLeft.ClientID %>");
        var stockItem = barMenuLeft.findItemByValue("Stock");
        var stockExpressItem = barMenuLeft.findItemByValue("Stock_Express");
        //var stockExpressSearchItem  = barMenuLeft.findItemByValue("Stock_Express_Search");
        var rowStkSteet = $telerik.findElement(stockExpressItem.get_element(), "rowStkSteet");
  
        if (selLocation != "") {
            if (selLocation.indexOf("BOUND5/", 0) != -1) {
                rowStkSteet.style.display = "inline";
  
            } else {
                rowStkSteet.style.display = "none"
            }
        }
    }
  
  
    function btnStkSearch_OnClientSearch() {
  
        var barMenuLeft = $find("<%= barMenuLeft.ClientID %>");
        var stockItem = barMenuLeft.findItemByValue("Stock");
        var stockExpressItem = barMenuLeft.findItemByValue("Stock_Express");
  
        var cboStkLocation = $telerik.findElement(stockExpressItem.get_element(), "cboStkLocation");
        var itemValue = $find(cboStkLocation.id).get_value();
        if (itemValue != null) {
            return true;
        } else {
            if (IsaNumber(itemValue)) {
                return true;
            } else {
                return false;
            }
        }
    }
  
    function IsaNumber(strString) {
        var strValidChars = "0123456789";
        var strChar;
        var blnResult = true;
        if (strString.length == 0) return false;
        for (var i = 0; i < strString.length && blnResult == true; i++) {
            if (strValidChars.indexOf(strString.charAt(i)) == -1) {
                blnResult = false;
            }
        }
        return blnResult;
    }
  
          
    </script>
<body onload="Resize();" >
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"  
            EnableScriptLocalization="True">
        </asp:ScriptManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
            </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
            meta:resourcekey="RadAjaxManager1Resource1" 
            DefaultLoadingPanelID="RadAjaxLoadingPanel1" >
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="mnuClientNew">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID ="tabMenuTop" />
                        <telerik:AjaxUpdatedControl ControlID ="mpgMain" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnClientSearch">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID ="tabMenuTop" />
                        <telerik:AjaxUpdatedControl ControlID ="mpgMain" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="cboStkPrice">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="txtStkPriceFr" />
                        <telerik:AjaxUpdatedControl ControlID="txtStkPriceTo" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="cboStkSize">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="txtStkSizeFr" />
                        <telerik:AjaxUpdatedControl ControlID="txtStkSizeTo" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rdlStkMarketType">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="cboStkPrice" />
                        <telerik:AjaxUpdatedControl ControlID="rdlStkMarketType" />
                        <telerik:AjaxUpdatedControl ControlID="txtStkPriceFr" />
                        <telerik:AjaxUpdatedControl ControlID="txtStkPriceTo" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnStkSearch">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID ="pnlMainContain" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <ClientEvents OnResponseEnd="Resize" />
        </telerik:RadAjaxManager>
                <div id="ParentDivElement" style="height: 100%;"
                    <telerik:RadSplitter ID="sptMain" runat="server" Skin="WebBlue" 
                        SplitBarsSize="" Width="100%" Height="100%" FullScreenMode="True" 
                        meta:resourcekey="sptMainResource1" >
                        <telerik:RadPane ID="pnlLeft" runat="server" Width="170px" Scrolling="Y" 
                            Index="0" meta:resourceKey="pnlLeftResource1">
                            <telerik:RadPanelBar ID="barMenuLeft" runat="server" Skin="Office2007" 
                                Width="98%" ExpandMode="FullExpandedItem" Height="95%" 
                                meta:resourceKey="barMenuLeftResource1" >
                                <Items>
                                    <telerik:RadPanelItem runat="server" Text="Client" Value="Client"  
                                        ImageUrl="~/images/User-icon.png" meta:resourceKey="RadPanelItemResource6" 
                                        Owner="" Visible="false">
                                        <Items>
                                            <telerik:RadPanelItem runat="server" meta:resourceKey="RadPanelItemResource1" 
                                                Owner=""  >
                                                <ItemTemplate>
                                                    <telerik:RadMenu ID="mnuClientNew" runat="server" Flow="Vertical" 
                                                        meta:resourceKey="mnuClientNewResource1" OnItemClick="mnuClientNew_ItemClick" 
                                                        Skin="Telerik" Width="100%">
                                                        <Items>
                                                            <telerik:RadMenuItem runat="server" meta:resourceKey="RadMenuItemResource5" 
                                                                Owner="" Text="New" Width="100%">
                                                                <Items>
                                                                    <telerik:RadMenuItem runat="server" meta:resourceKey="RadMenuItemResource1" 
                                                                        Owner="" Text="Contact" Value="Contact" />
                                                                    <telerik:RadMenuItem runat="server" meta:resourceKey="RadMenuItemResource2" 
                                                                        Owner="" Text="Company" Value="Company" />
                                                                    <telerik:RadMenuItem runat="server" meta:resourceKey="RadMenuItemResource3" 
                                                                        Owner="" Text="Brand" Value="Brand" />
                                                                    <telerik:RadMenuItem runat="server" meta:resourceKey="RadMenuItemResource4" 
                                                                        Owner="" Text="Agent" Value="Agent" />
                                                                </Items>
                                                            </telerik:RadMenuItem>
                                                        </Items>
                                                    </telerik:RadMenu>
  
                                                </ItemTemplate>
                                            </telerik:RadPanelItem>
                                            <telerik:RadPanelItem runat="server" meta:resourcekey="RadPanelItemResource2" 
                                                Owner="" Value="Client_Express">
                                                <ItemTemplate>
                                                    <table>
                                                        <tr height="30">
                                                            <td>
                                                                <telerik:RadComboBox ID="cboClientName" runat="server" AllowCustomText="True" 
                                                                    EnableLoadOnDemand="True" ExpandDelay="400" 
                                                                    meta:resourceKey="cboClientNameResource1" 
                                                                    OnClientItemsRequesting="cboClientName_OnClientItemsRequesting" 
                                                                    OnClientKeyPressing="cboClientName_keyPressHandler" 
                                                                    OnItemsRequested="cboClientName_ItemsRequested" Skin="Office2007" Width="160px">
                                                                      
                                                                </telerik:RadComboBox>
                                                                   
                                                                <asp:ImageButton ID="btnClientSearch" runat="server" 
                                                                    ImageUrl="~/images/search.png" meta:resourceKey="btnClientSearchResource1" 
                                                                    OnClick="btnClientSearch_Click" />
                                                                 [<a ID="refAdvSearch" href="javascript: void(0);" 
                                                                    onclick="toggle(this, 'gpClientAdvSearch');" title="Advance Search">+</a>]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div ID="gpClientAdvSearch" style="display:none">
                                                                    <fieldset>
                                                                        <legend>
                                                                            <asp:Label ID="lblClientAdvanceSearchCriteria" runat="server" 
                                                                                meta:resourcekey="lblClientAdvanceSearchCriteriaResource1" 
                                                                                Text="<%$ Resources:lblClientAdvanceSearchCriteria.Text %>" />
                                                                        </legend>
                                                                        <table>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblClientName" runat="server" 
                                                                                        meta:resourcekey="lblClientNameResource1" 
                                                                                        Text="<%$ Resources:lblClientName.Text %>" />
                                                                                    :</td>
                                                                                <td>
                                                                                    <table width="100%">
                                                                                        <tr>
                                                                                            <td>
                                                                                                <asp:RadioButton ID="rdoClientStartWith" runat="server" Checked="True" 
                                                                                                    GroupName="ClientName" meta:resourcekey="rdoClientStartWithResource1" 
                                                                                                    Text="Start With" />
                                                                                            </td>
                                                                                            <td>
                                                                                                <asp:RadioButton ID="rdoClientContain" runat="server" GroupName="ClientName" 
                                                                                                    meta:resourcekey="rdoClientContainResource1" Text="Contain" />
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td colspan="2">
                                                                                    <hr />
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td valign="top">
                                                                                    <asp:Label ID="lblClientType" runat="server" 
                                                                                        meta:resourcekey="lblClientTypeResource1" 
                                                                                        Text="<%$ Resources:lblClientType.Text %>" />
                                                                                    :
                                                                                </td>
                                                                                <td>
                                                                                    <table width="100%">
                                                                                        <tr>
                                                                                            <td>
                                                                                                <asp:RadioButton ID="rdoClientAll" runat="server" Checked="True" 
                                                                                                    GroupName="clientType" meta:resourcekey="rdoClientAllResource1" Text="All" />
                                                                                            </td>
                                                                                            <td>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td>
                                                                                                <asp:RadioButton ID="rdoClientCompany" runat="server" GroupName="clientType" 
                                                                                                    meta:resourcekey="rdoClientCompanyResource1" Text="Company" />
                                                                                            </td>
                                                                                            <td>
                                                                                                <asp:RadioButton ID="rdoClientContact" runat="server" 
                                                                                                    meta:resourcekey="rdoClientContactResource1" Text="Contact" />
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td>
                                                                                                <asp:RadioButton ID="rdoClientBrand" runat="server" 
                                                                                                    meta:resourcekey="rdoClientBrandResource1" Text="Brand" />
                                                                                            </td>
                                                                                            <td>
                                                                                                <asp:RadioButton ID="rdoClientAgency" runat="server" 
                                                                                                    meta:resourcekey="rdoClientAgencyResource1" Text="Agency" />
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblClientPhone" runat="server" 
                                                                                        meta:resourcekey="lblClientPhoneResource1" 
                                                                                        Text="<%$ Resources:lblClientPhone.Text %>" />
                                                                                    :</td>
                                                                                <td>
                                                                                    <asp:TextBox ID="txtClientPhone" runat="server" 
                                                                                        meta:resourcekey="txtClientPhoneResource1" Width="140px"></asp:TextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblClientVehicleNumber" runat="server" 
                                                                                        meta:resourcekey="lblClientVehicleNumberResource1" 
                                                                                        Text="<%$ Resources:lblClientVehicleNumber.Text %>" />
                                                                                    :</td>
                                                                                <td>
                                                                                    <asp:TextBox ID="txtClientVehicleNumber" runat="server" 
                                                                                        meta:resourcekey="txtClientVehicleNumberResource1" Width="140px"></asp:TextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblClientEmail" runat="server" 
                                                                                        meta:resourcekey="lblClientEmailResource1" 
                                                                                        Text="<%$ Resources:lblClientEmail.Text %>" />
                                                                                    :</td>
                                                                                <td>
                                                                                    <asp:TextBox ID="txtClientEmail" runat="server" 
                                                                                        meta:resourcekey="txtClientEmailResource1" Width="140px"></asp:TextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblClientBirthdayFr" runat="server" 
                                                                                        meta:resourcekey="lblClientBirthdayFrResource1" 
                                                                                        Text="<%$ Resources:lblClientBirthdayFr.Text %>" />
                                                                                    :</td>
                                                                                <td>
                                                                                    <telerik:RadDatePicker ID="dpClientBirthdayFr" runat="server" Culture="en-US" 
                                                                                        meta:resourcekey="dpClientBirthdayFrResource1" Skin="Office2007" Width="140px">
                                                                                        <Calendar Skin="Office2007" UseColumnHeadersAsSelectors="False" 
                                                                                            UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                                                                                        </Calendar>
                                                                                        <DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy" 
                                                                                            LabelCssClass="" Width="">
                                                                                        </DateInput>
                                                                                        <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                                                                    </telerik:RadDatePicker>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblClientBirthdayTo" runat="server" 
                                                                                        meta:resourcekey="lblClientBirthdayToResource1" 
                                                                                        Text="<%$ Resources:lblClientBirthdayTo.Text %>" />
                                                                                    :</td>
                                                                                <td>
                                                                                    <telerik:RadDatePicker ID="dpClientBirthdayTo" runat="server" Culture="en-US" 
                                                                                        meta:resourcekey="dpClientBirthdayToResource1" Skin="Office2007" Width="140px">
                                                                                        <Calendar Skin="Office2007" UseColumnHeadersAsSelectors="False" 
                                                                                            UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                                                                                        </Calendar>
                                                                                        <DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy" 
                                                                                            LabelCssClass="" Width="">
                                                                                        </DateInput>
                                                                                        <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                                                                    </telerik:RadDatePicker>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblClientShowAllAsso" runat="server" 
                                                                                        meta:resourcekey="lblClientShowAllAssoResource1" 
                                                                                        Text="<%$ Resources:lblClientShowAllAsso.Text %>" />
                                                                                    :</td>
                                                                                <td>
                                                                                    <asp:CheckBox ID="chkShowAllAsso" runat="server" 
                                                                                        meta:resourceKey="chkShowAllAssoResource1" />
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </fieldset>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:LinkButton ID="btnClientFav" runat="server" 
                                                                    meta:resourcekey="btnClientFavResource1" 
                                                                    OnClientClick="showMyList('Stock', 'Favourites');return false;" 
                                                                    Text="My Favourite"></asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:LinkButton ID="btnClientAccessHistory" runat="server" 
                                                                    meta:resourcekey="btnClientAccessHistoryResource1" Text="My Access History"></asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </telerik:RadPanelItem>
                                        </Items>
                                    </telerik:RadPanelItem>
                                    <telerik:RadPanelItem runat="server" Text="Stock" Value="Stock" 
                                        ImageUrl="~/images/Property-icon.png" 
                                        meta:resourcekey="RadPanelItemResource4" Owner="" Expanded="true" >
                                        <Items>
                                            <telerik:RadPanelItem runat="server" meta:resourcekey="RadPanelItemResource3" 
                                                Owner="" Value="Stock_Express"    >
                                                <ItemTemplate>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <telerik:RadTabStrip ID="tabStk" runat="server" 
                                                                    meta:resourcekey="tabStkResource1" MultiPageID="mpgStk" SelectedIndex="0" 
                                                                    Skin="Office2007" Visible="False">
                                                                    <Tabs>
                                                                        <telerik:RadTab runat="server" meta:resourcekey="RadTabResource1" Owner="" 
                                                                            Selected="True" SelectedIndex="0" Text="Info" Value="Info">
                                                                        </telerik:RadTab>
                                                                        <telerik:RadTab runat="server" meta:resourcekey="RadTabResource2" Owner="" 
                                                                            SelectedIndex="1" Text="Preset" Value="Preset">
                                                                        </telerik:RadTab>
                                                                        <telerik:RadTab runat="server" meta:resourcekey="RadTabResource3" Owner="" 
                                                                            SelectedIndex="2" Text="Map" Value="Map">
                                                                        </telerik:RadTab>
                                                                    </Tabs>
                                                                </telerik:RadTabStrip>
                                                                <telerik:RadMultiPage ID="mpgStk" runat="server" BorderColor="Gainsboro" 
                                                                    BorderWidth="1px" meta:resourceKey="mpgStkResource1" SelectedIndex="0">
                                                                    <telerik:RadPageView ID="pvwStkInfo" runat="server" 
                                                                        meta:resourcekey="pvwStkInfoResource1" Selected="True">
                                                                        <table >
                                                                            <tr>
                                                                                <td>
                                                                                    <telerik:RadComboBox ID="cboStkLocation" runat="server" AllowCustomText="True" 
                                                                                        DropDownWidth="450px" EnableLoadOnDemand="True" Height="200px" 
                                                                                         meta:resourcekey="cboStkLocationResource1" 
                                                                                        HighlightTemplatedItems="true"
                                                                                        OnClientSelectedIndexChanged="cboStkLocation_OnClientSelectedIndexChanged" 
                                                                                        OnItemsRequested="cboStkLocation_ItemsRequested" Width="150px">
                                                                                        <ItemTemplate>
                                                                                            <table cellpadding="0" cellspacing="0" border="0" style="width:390px;"   >
                                                                                                <tr>
                                                                                                    <td width="0px">
                                                                                                        <%# DataBinder.Eval(Container.DataItem , "Name")%>
                                                                                                    </td>
                                                                                                    <td width="160px">
                                                                                                        <%# DataBinder.Eval(Container.DataItem, "Description")%>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </ItemTemplate>
                                                                                    </telerik:RadComboBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr ID="rowStkSteet" style="display:none" >
                                                                                <td>
                                                                                    <telerik:RadNumericTextBox ID="txtStkStreetFr" runat="server" Culture="en-US" 
                                                                                        EmptyMessage="Str No. Fr" LabelCssClass="" 
                                                                                        meta:resourcekey="txtStkStreetFrResource1" Skin="Office2007" Width="60px" 
                                                                                        DataType="System.Int16" MaxValue="5000" MinValue="0">
                                                                                        <NumberFormat DecimalDigits="0" GroupSeparator="" />
                                                                                    </telerik:RadNumericTextBox>
                                                                                    -
                                                                                    <telerik:RadNumericTextBox ID="txtStkStreetTo" runat="server" Culture="en-US" 
                                                                                        EmptyMessage="Str No. To" LabelCssClass="" 
                                                                                        meta:resourcekey="txtStkStreetToResource1" Skin="Office2007" Width="60px" 
                                                                                        DataType="System.Int16" MaxValue="5000" MinValue="0">
                                                                                        <NumberFormat DecimalDigits="0" GroupSeparator="" />
                                                                                    </telerik:RadNumericTextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <telerik:RadComboBox ID="cboStkOwner" runat="server" AllowCustomText="True" 
                                                                                        DropDownWidth="450px" EnableLoadOnDemand="True" Height="200px" 
                                                                                        HighlightTemplatedItems="true"
                                                                                        meta:resourcekey="cboStkOwnerResource1" Width="150px" 
                                                                                        onitemsrequested="cboStkOwner_ItemsRequested" >
                                                                                        <ItemTemplate>
                                                                                            <table style="width:390px; border-width:0px; padding:0,0,0,0" >
                                                                                                <tr>
                                                                                                    <td width="160px">
                                                                                                        <%# DataBinder.Eval(Container.DataItem, "Name")%>
                                                                                                    </td>
                                                                                                    <td width="160px">
                                                                                                        <%# DataBinder.Eval(Container.DataItem, "Description")%>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </ItemTemplate>
                                                                                    </telerik:RadComboBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <telerik:RadComboBox ID="cboStkPrice" runat="server" AllowCustomText="True" 
                                                                                        AutoPostBack="True" EmptyMessage="Price" MarkFirstMatch="true" 
                                                                                        meta:resourcekey="cboStkPriceResource1" 
                                                                                        onselectedindexchanged="cboStkPrice_SelectedIndexChanged" Width="150px">
                                                                                    </telerik:RadComboBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <telerik:RadComboBox ID="cboStkSize" runat="server" AllowCustomText="True" 
                                                                                        AutoPostBack="True" EmptyMessage="Size" MarkFirstMatch="true" 
                                                                                        meta:resourcekey="cboStkSizeResource1" 
                                                                                        onselectedindexchanged="cboStkSize_SelectedIndexChanged" Width="150px">
                                                                                    </telerik:RadComboBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:RadioButtonList ID="rdlStkMarketType" runat="server" AutoPostBack="True" 
                                                                                        RepeatDirection="Horizontal" 
                                                                                        onselectedindexchanged="rdlStkMarketType_SelectedIndexChanged"
                                                                                            on >
                                                                                        <asp:ListItem>Let</asp:ListItem>
                                                                                        <asp:ListItem>Sale</asp:ListItem>
                                                                                    </asp:RadioButtonList>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                        <table>
                                                                            <tr ID="trStkActive" style="display:none">
                                                                                <td>
                                                                                    <asp:Label ID="lblStkActiveOnly" runat="server" 
                                                                                        meta:resourcekey="lblStkActiveOnlyResource1" 
                                                                                        Text="<%$ Resources:lblStkActiveOnly.Text %>" />
                                                                                </td>
                                                                                <td>
                                                                                    <table>
                                                                                        <tr>
                                                                                            <td>
                                                                                                <asp:CheckBox ID="chkStkActive" runat="server" Checked="true" 
                                                                                                    meta:resourcekey="chkStkActiveResource1" />
                                                                                                 </td>
                                                                                            <td>
                                                                                                 <asp:Label ID="lblStkLastEdit" runat="server" 
                                                                                                    meta:resourcekey="lblStkLastEditResource1" 
                                                                                                    Text="<%$ Resources:lblStkLastEdit.Text %>" />
                                                                                            </td>
                                                                                            <td>
                                                                                                <telerik:RadComboBox ID="rboStkLastEdit" runat="server" AllowCustomText="True" 
                                                                                                    EnableLoadOnDemand="True" meta:resourcekey="rboStkLastEditResource1" 
                                                                                                    Skin="Office2007">
                                                                                                </telerik:RadComboBox>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </td>
                                                                            </tr>
                                                                            <tr ID="trStkFunction" style="display:none">
                                                                                <td>
                                                                                    <asp:Label ID="lblStkFunction" runat="server" 
                                                                                        meta:resourcekey="lblStkFunctionResource1" 
                                                                                        Text="<%$ Resources:lblStkFunction.Text %>" />
                                                                                </td>
                                                                                <td>
                                                                                    <asp:CheckBox ID="chkStockRES" runat="server" 
                                                                                        meta:resourcekey="chkStockRESResource1" Text="RES" />
                                                                                    <asp:CheckBox ID="chkStockRET" runat="server" 
                                                                                        meta:resourcekey="chkStockRETResource1" Text="RET" />
                                                                                    <asp:CheckBox ID="chkStockCOM" runat="server" 
                                                                                        meta:resourcekey="chkStockCOMResource1" Text="COM" />
                                                                                    <asp:CheckBox ID="chkStockIDU" runat="server" 
                                                                                        meta:resourcekey="chkStockIDUResource1" Text="IDU" />
                                                                                </td>
                                                                            </tr>
                                                                            <tr ID="trStkLastEdit" style="display:none">
                                                                                <td>
                                                                                    <asp:Label ID="lblStkLastEditDate" runat="server" 
                                                                                        meta:resourcekey="lblStkLastEditDateResource1" 
                                                                                        Text="<%$ Resources:lblStkLastEditDate.Text %>" />
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadDatePicker ID="dtpLastEdit" runat="server" Culture="en-US" 
                                                                                        meta:resourcekey="dtpLastEditResource1">
                                                                                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                                                            ViewSelectorText="x">
                                                                                        </Calendar>
                                                                                        <DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy" 
                                                                                            LabelCssClass="" Width="">
                                                                                        </DateInput>
                                                                                        <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                                                                    </telerik:RadDatePicker>
                                                                                </td>
                                                                            </tr>
                                                                            <tr ID="trStkCommerce" style="display:none">
                                                                                <td>
                                                                                    <asp:Label ID="lblStkCommerceDate" runat="server" 
                                                                                        meta:resourcekey="lblStkCommerceDateResource1" 
                                                                                        Text="<%$ Resources:lblStkCommerceDate.Text %>" />
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadDatePicker ID="dtpCommerceFr" runat="server" Culture="en-US" 
                                                                                        meta:resourcekey="dtpCommerceFrResource1">
                                                                                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                                                            ViewSelectorText="x">
                                                                                        </Calendar>
                                                                                        <DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy" 
                                                                                            LabelCssClass="" Width="">
                                                                                        </DateInput>
                                                                                        <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                                                                    </telerik:RadDatePicker>
                                                                                    -
                                                                                    <telerik:RadDatePicker ID="dtpCommerceTo" runat="server" Culture="en-US" 
                                                                                        meta:resourcekey="dtpCommerceToResource1">
                                                                                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                                                            ViewSelectorText="x">
                                                                                        </Calendar>
                                                                                        <DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy" 
                                                                                            LabelCssClass="" Width="">
                                                                                        </DateInput>
                                                                                        <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                                                                    </telerik:RadDatePicker>
                                                                                </td>
                                                                            </tr>
                                                                            <tr ID="trStkExpiry" style="display:none">
                                                                                <td>
                                                                                    <asp:Label ID="lblStkExpiry" runat="server" 
                                                                                        meta:resourcekey="lblStkExpiryResource1" 
                                                                                        Text="<%$ Resources:lblStkExpiry.Text %>" />
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadDatePicker ID="dtpExpiryFr" runat="server" Culture="en-US" 
                                                                                        meta:resourcekey="dtpExpiryFrResource1">
                                                                                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                                                            ViewSelectorText="x">
                                                                                        </Calendar>
                                                                                        <DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy" 
                                                                                            LabelCssClass="" Width="">
                                                                                        </DateInput>
                                                                                        <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                                                                    </telerik:RadDatePicker>
                                                                                    -
                                                                                    <telerik:RadDatePicker ID="dtpExpiryTo" runat="server" Culture="en-US" 
                                                                                        meta:resourcekey="dtpExpiryToResource1">
                                                                                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                                                            ViewSelectorText="x">
                                                                                        </Calendar>
                                                                                        <DateInput DateFormat="dd-MM-yyyy" DisplayDateFormat="dd-MM-yyyy" 
                                                                                            LabelCssClass="" Width="">
                                                                                        </DateInput>
                                                                                        <DatePopupButton CssClass="" HoverImageUrl="" ImageUrl="" />
                                                                                    </telerik:RadDatePicker>
                                                                                </td>
                                                                            </tr>
                                                                            <tr ID="trStkMarketPrice" style="display:none">
                                                                                <td>
                                                                                    Price
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadNumericTextBox ID="txtStkPriceFr" runat="server" Width="80px">
                                                                                    </telerik:RadNumericTextBox>-<telerik:RadNumericTextBox ID="txtStkPriceTo" runat="server" Width="80px">
                                                                                    </telerik:RadNumericTextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr ID="trStkSize" style="display:none">
                                                                                <td>
                                                                                    Size
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadNumericTextBox ID="txtStkSizeFr" runat="server" Width="80px">
                                                                                    </telerik:RadNumericTextBox>-<telerik:RadNumericTextBox ID="txtStkSizeTo" runat="server" Width="80px">
                                                                                    </telerik:RadNumericTextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td colspan="2">
                                                                                    <a ID="refStkAdvanced" href="javascript:void(0);" 
                                                                                        onclick="showHideStkSearch();">
                                                                                    <asp:Literal ID="litAdvance" runat="server" 
                                                                                        Text="<%$ Resources:litAdvance.Text %>" />
                                                                                    </a>
                                                                                </td>
                                                                                  
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Button ID="btnStkReset" runat="server" 
                                                                                        meta:resourcekey="btnStkResetResource1" Text="Reset" />
                                                                                    <asp:Button ID="btnStkSearch" runat="server" 
                                                                                        meta:resourcekey="btnStkSearchResource1" OnClick="btnStkSearch_Click" 
                                                                                        OnClientClick="javascript: if(!btnStkSearch_OnClientSearch()) return false;" 
                                                                                        Text="Search" />
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </telerik:RadPageView>
                                                                    <telerik:RadPageView ID="pvwStkPreset" runat="server" 
                                                                        meta:resourcekey="pvwStkPresetResource1">
                                                                    </telerik:RadPageView>
                                                                    <telerik:RadPageView ID="pvwStkMap" runat="server" 
                                                                        meta:resourcekey="pvwStkMapResource1">
                                                                    </telerik:RadPageView>
                                                                </telerik:RadMultiPage>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:LinkButton ID="btnStkFav" runat="server" 
                                                                    meta:resourcekey="btnStkFavResource1" 
                                                                    OnClientClick="showMyList('Stock', 'Favourites');return false;" 
                                                                    Text="My Favourite"></asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:LinkButton ID="btnStkAccessHistory" runat="server" 
                                                                    meta:resourcekey="btnStkAccessHistoryResource1" Text="My Access History"></asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                    </table>
                                               </ItemTemplate
                                            </telerik:RadPanelItem>
                                        </Items>
                                    </telerik:RadPanelItem>
                                    <telerik:RadPanelItem runat="server" Text="Invoice" 
                                        meta:resourcekey="RadPanelItemResource5" Owner="" visible="false">
                                    </telerik:RadPanelItem>
                                </Items>
                                <ExpandAnimation Type="None"  Duration="0" />
                                <CollapseAnimation Duration="0" Type="None" />
                            </telerik:RadPanelBar>
                        </telerik:RadPane>
                        <telerik:RadSplitBar ID="barMain" runat="server" CollapseMode="Forward" 
                            Index="1" meta:resourcekey="barMainResource1" >
                        </telerik:RadSplitBar>
  
                        <telerik:RadPane ID="pnlMain" runat="server" Index="2" 
                            meta:resourcekey="pnlMainResource1" >
                            <asp:Panel runat="server"  ID="pnlMainContain">
                            <table width="100%">
                                <tr>
                                    <td >
                                        <telerik:RadTabStrip ID="tabMenuTop" runat="server" SelectedIndex="0" 
                                            Skin="Office2007" MultiPageID="mpgMain" 
                                            meta:resourcekey="tabMenuTopResource1" >
                                            <Tabs>
                                                <telerik:RadTab runat="server" Selected="True" SelectedIndex="0" Text="Client" 
                                                    Value="Client" meta:resourcekey="RadTabResource4" Owner="" Visible="false" >
                                                </telerik:RadTab>
                                                <telerik:RadTab runat="server" SelectedIndex="1" Text="Stock" Value="Stock" 
                                                    meta:resourcekey="RadTabResource5" Owner="" >
                                                </telerik:RadTab>
                                                <telerik:RadTab runat="server" SelectedIndex="2" Text="Invoice" Value="Invoice" 
                                                    meta:resourcekey="RadTabResource6" Owner="" Visible="false" >
                                                </telerik:RadTab>
                                            </Tabs>
                                        </telerik:RadTabStrip>
                                    </td>
                                </tr>
                                <tr>
                                    <td >
                                        <telerik:RadMultiPage ID="mpgMain" runat="server" SelectedIndex="0" 
                                            Width="100%" meta:resourcekey="mpgMainResource1" >
                                            <telerik:RadPageView ID="pvwClient" runat="server" 
                                                meta:resourceKey="pvwClientResource1" Selected="True">
                                                <iframe id="frameClient" runat="server"  width="100%" >
                                                </iframe>
                                            </telerik:RadPageView>
                                            <telerik:RadPageView ID="pvwStock" runat="server" TabIndex="1" 
                                                meta:resourcekey="pvwStockResource1"  >
                                                <iframe id="frameStock" runat="server"  width="100%" >
                                                </iframe>
                                            </telerik:RadPageView>
                                            <telerik:RadPageView ID="pvwInvoice" runat="server" TabIndex="2" 
                                                meta:resourcekey="pvwInvoiceResource1" >
                                                <iframe id="frameInvoice" runat="server"  width="100%"  >
                                                </iframe>
                                            </telerik:RadPageView>
                                        </telerik:RadMultiPage>
                                    </td>
                                </tr>
                            </table>
                            </asp:Panel>
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                    </div>
          
    </form>
</body>
</html>

2 Answers, 1 is accepted

Sort by
0
CH
Top achievements
Rank 1
answered on 18 Oct 2010, 08:58 AM

protected void cboStkOwner_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
   {
       space = "";
       STEPS_Client_DataAdapter clientDA = new STEPS_Client_DataAdapter();
       RadComboBox cbo = (RadComboBox)o;
       cbo.Items.Clear();
       Int64 EmployeeId;
       string inputText = e.Text + "%";
       if (e.Text.Length > 2)
       {
           if (_employeeId != null)
           {
               if (Int64.TryParse(_employeeId, out EmployeeId))
               {
                   DataSet ds = clientDA.GetClientIdByNameDataSet(inputText, EmployeeId);
                   cbo.DataValueField = "Id";
                   cbo.DataTextField = "Name";
                   cbo.DataSource = ds;
                   cbo.DataBind();
                   //foreach (DataRow dRow in ds.Tables[0].Rows)
                   //{
                   //    RadComboBoxItem item = new RadComboBoxItem();
                   //    item.Text = dRow["Name"].ToString();
                   //    item.Value = dRow["Id"].ToString();
                   //    item.Attributes.Add("Description", dRow["Description"].ToString());
                   //    item.Attributes.Add("TextName", dRow["Name"].ToString());
                   //    cboStkOwner.Items.Add(item);
                   //    item.DataBind();
                         
                   //}
               }
           }
       }
   }

public DataSet GetClientIdByNameDataSet(string clientName, Int64 EmployeeId)
        { DataSet ds = new DataSet();
            try
            {
  
  
                using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["RESI_HK_Offline_EDConnectionString"].ConnectionString))
                {
                    SqlCommand comm = new SqlCommand();
                    comm.Connection = conn;
  
                    comm.CommandText = "[sp_SearchClientIdByName]";
                    comm.CommandType = CommandType.StoredProcedure;
                    comm.Parameters.Add("@EmployeeId", SqlDbType.Int).Value = EmployeeId;
                    comm.Parameters.Add("@ClientName", SqlDbType.NVarChar).Value = clientName;
  
                    SqlDataAdapter da = new SqlDataAdapter(comm);
                    da.Fill(ds, "DefaultView");
  
                }
  
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return ds;
  
        }

Here is my code behide

Thank you

From CH
0
CH
Top achievements
Rank 1
answered on 29 Oct 2010, 09:14 AM
is anyone can give me some help?
Tags
ComboBox
Asked by
CH
Top achievements
Rank 1
Answers by
CH
Top achievements
Rank 1
Share this question
or