Template in combobox

4 posts, 0 answers
  1. MBEN
    MBEN avatar
    203 posts
    Member since:
    Nov 2011

    Posted 08 Mar 2017 Link to this post

    Hi,

     

    I have a scenario where i wanted a textbox against a list of employees to enter some details. I want to disable the selection text while still being able retrieve the details entered against each employee in the given textbox. I could have used a grid control but for something this simple I like the dropdown feature of combobox. I was able to get the textbox in the template but I wasn't able to disable/hide the selection text. Is this doable?

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    689 posts

    Posted 13 Mar 2017 Link to this post

    Hello,

    Would you please provide some examples and screenshots demonstrating the current and the expected behavior? 

    Also, would you please clarify what are you referring to with "selection text"?

    Once we completely understand the desired scenario we would be able to provide more specific and accurate answers.

    Regards,
    Peter Milchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. MBEN
    MBEN avatar
    203 posts
    Member since:
    Nov 2011

    Posted 13 Mar 2017 in reply to Peter Milchev Link to this post

    by selection text, I meant the combobox text.

     

    Attached below is a screenshot of what I am trying to achieve. I need the user to be able to enter values in the textboxes but i don't want to display any text in the combobox (ex. John Smith in the screenshot).

     

    Below is my declaration for the combobox.

    <telerik:RadComboBox ID="rcbRetirementAge"  runat="server" AutoPostBack="False"
                                        HighlightTemplatedItems="True" ShowToggleImage="True" DropDownWidth="350px"
                                        DataSourceID="_dataSrcRetirementAge" DataTextField="DisplayName" DataValueField="EmployeeID">
                                        <ItemTemplate>
                                            <table class="calculation_table">
                                                <tr>
                                                    <td class="calc_input">
                                                        <asp:Label ID="Label16" runat="server" Text='<%# Eval("DisplayName")%>'></asp:Label>
                                                    </td>
                                                    <td class="calc_label">
                                                        <asp:TextBox ID="tbRetirementAge" runat="server" Width="50px" Text='<%# Eval("RetirementAge") %>'></asp:TextBox>
                                                    </td>
                                                </tr>
                                            </table>                                       
                                        </ItemTemplate>
                                        <Items>
                                        </Items>
                                    </telerik:RadComboBox>
  4. Peter Milchev
    Admin
    Peter Milchev avatar
    689 posts

    Posted 16 Mar 2017 Link to this post

    Hello,

    One option to achieve such result is to hide the input with class .rcbInpu using CSS styles:

    .RadComboBox .rcbInput {
        visibility: hidden;
    }

    Regards,
    Peter Milchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top