<ul> <li> <em>Out-of-the-box XHTML-enabled Output...</em> </li> <li> <em>Unmatched Loading Speed and Performance</em> </li> <li> <em>Microsoft Word-like Spell-checking</em> </li> <li> <em>Seven Ways for Pasting from Word</em> </li> <li> <em>Multilevel Undo/Redo with Action Trails</em> </li> <li> <em>Extended Functionality Through Integrated Controls</em> </li></ul><ul> <li> <em><span></span></em></li> <span>Out-of-the-box XHTML-enabled Output... Unmatched Loading Speed and Performance Microsoft Word-like Spell-checking Seven Ways for Pasting from Word Multilevel Undo/Redo with Action Trails Extended Functionality Through Integrated Controls</span> <li><em></em> </li></ul>Well, I have seen similar problems and corresponding solutions on the forums, but none of those was applicable for this problem. I already have tried and searched almost any given solution on the forums here and around the internet, but unfortunately to no avail.
So, what exactly is the problem? I have got a RadComboBox which has an ObjectDataSource. This ComboBox has been placed in an EditItemTemplate within a RadListView. I want this RadComboBox to display the name of the currently selected customer as SelectedIndex (SelectedValue or Text). Items are filled based upon data out of an XmlDataSource object. The ObjectDataSource contains all possible customers.
Let's say I have inserted a new item with customer: "Customer1", but I'd like to edit this item. When you go into the EditItemTemplate view, I want to have the RadComboBox select (SelectedIndex/Value or Text) "Customer1" (which is based upon the XmlDataSource) from the ObjectDataSource.
My RadComboBox and ObjectDataSource look like:
<telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="false" DataSourceID="ObjectDataSource1" DataTextField="Name" DataValueField="Name" DropDownWidth="128px" EmptyMessage="-Customer-" EnableAutomaticLoadOnDemand="true" EnableVirtualScrolling="true" Filter="Contains" Height="150px" ItemsPerRequest="10" MarkFirstMatch="true" MinFilterLength="2" ShowMoreResultsBox="true" Width="128px"> </telerik:RadComboBox> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetCustomers" TypeName="RadControlsWebApp1.Customers"> </asp:ObjectDataSource><?xml version="1.0" encoding="utf-8"?> <Activities> <Activity Customer="Customer1" Project="Project1" /> <Activity Customer="Customer1" Project="Project2" /> <Activity Customer="Customer2" Project="Project2" /> <Activity Customer="Customer3" Project="Project3" /> </Activities>
<head runat="server"> <title>Untitled</title> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <form id="mainForm" runat="server"> <telerik:RadScriptManager runat=server ID="ScriptManager"></telerik:RadScriptManager> <div> <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" Skin="Vista" ScrollChildren="true" ScrollButtonsPosition="Middle" Orientation="HorizontalTop"> <TabTemplate> <div class="textWrapper"> <%# DataBinder.Eval(Container, "Text") %> </div> <span class="ie6shim"></span> <img src="Images/Close.gif" alt="Close" onclick="deleteTab('<%# DataBinder.Eval(Container, "Text") %>')" /> <TabTemplate> <Tabs> <telerik:RadTab runat="server" Selected="True" Text="Tab1"></telerik:RadTab> <telerik:RadTab runat="server" Text="Tab2"></telerik:RadTab> <telerik:RadTab runat="server" Text="Tab3"></telerik:RadTab> </Tabs> </telerik:RadTabStrip> </div> </form> </body> This is the styles.css file: .tabStrip { position:absolute; top:0; } .rtsIn img { vertical-align:middle; width: 14px; height: 14px; margin-left: 10px; } .rtsIn .textWrapper { display: inline; } /* IE6 fixes for line-height bug */ * html .rtsIn img { margin-bottom: 10px; } * html .rtsIn .textWrapper { float: left; height:26px; } * html .rtsIn .ie6shim { height: 26px; display: inline-block; }