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

Combobox resets to un-selected on lost focus when bound to Objectdatasource

5 Answers 170 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 25 Mar 2009, 01:14 PM
I have a combobox bound to an objectdatasource, when I select an item and move to a new control the combo box resets to unlected. I created a form with 3 comboboxes, 1 manually populated, 1 bound to na objectdatasource and 1 bound to a sqldatasource, only the object bound combobox exhibits this behaviour.
below is my aspx code, there is no code behind

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/master_default.Master" CodeBehind="Testing.aspx.vb" Inherits="LearningDepot.Testing" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
 
    <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="ODSLookup"
        DataTextField="LookupKey" DataValueField="ID">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </telerik:RadComboBox>
       
    <telerik:RadComboBox ID="RadComboBox2" runat="server">
        <Items>
            <telerik:RadComboBoxItem runat="server" Text="Cell" Value="1" />
            <telerik:RadComboBoxItem runat="server" Text="Home" Value="2" />
            <telerik:RadComboBoxItem runat="server" Text="Office" Value="3" />
            <telerik:RadComboBoxItem runat="server" Text="Fax" Value="4" />
        </Items>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </telerik:RadComboBox>
   
    <telerik:RadComboBox ID="RadComboBox3" runat="server" DataSourceID="SDSLookup"
        DataTextField="LookupKey" DataValueField="LookupId">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </telerik:RadComboBox>

    <telerik:RadTextBox ID="RadTextBox2" runat="server">
    </telerik:RadTextBox>

    <asp:ObjectDataSource ID="ODSLookup" runat="server"
        SelectMethod="DataList" TypeName="LearningDepotAPI.Lookups">
        <SelectParameters>
            <asp:Parameter DefaultValue="PhoneType" Name="lookupGroup" Type="String" />
            <asp:Parameter DefaultValue="1" Name="recordStatus" Type="Object" />
            <asp:Parameter DefaultValue="1" Name="SortBy" Type="Object" />
        </SelectParameters>
    </asp:ObjectDataSource>

    <asp:SqlDataSource ID="SDSLookup" runat="server"
        ConnectionString="<%$ ConnectionStrings:pmbLD_DB %>"
        SelectCommand="pmbLDsp_COLL_Lookup_ByKey" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter DefaultValue="PhoneType" Name="LookupGroup" Type="String" />
            <asp:Parameter DefaultValue="1" Name="StatusFlag" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>

5 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 30 Mar 2009, 04:24 PM
Hi Mike,

I was unable to reproduce the issue in our live demo.

Could you please open a support ticket and send us a runnable project where we can observe the issue and investigate it?

Regards,
Simon
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Swadesh Brojolall
Top achievements
Rank 1
answered on 04 Jun 2010, 12:58 PM
Hi, I am having the same problem. What the solution to this problem?
0
Mike
Top achievements
Rank 1
answered on 27 Sep 2010, 02:22 PM
I am also experiencing this same issue.  Has a resolution been discovered?
0
Simon
Telerik team
answered on 29 Sep 2010, 02:51 PM
Hi,

Could anyone of you guys open a support ticket and send us a sample runnable project that shows the issue there so that we can debug it? We will be glad to debug this issue and fix it.
 
All the best,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mike
Top achievements
Rank 1
answered on 29 Sep 2010, 09:19 PM
It has been a long time since I first posted this. It ended up being something I didn't do right. I think it was something as simple as I was populating the drop down on postback everytime. I wasn't checking for 'IsPostback', so I was stomping on my own feet. I know it wasn't a problem with the control or the fact that it was an objectdatasource, that was just a coincidence.

Hope that helps
   Mike
Tags
ComboBox
Asked by
Mike
Top achievements
Rank 1
Answers by
Simon
Telerik team
Swadesh Brojolall
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Share this question
or