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

Template in combobox

3 Answers 7 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
MBEN
Top achievements
Rank 1
Veteran
MBEN asked on 08 Mar 2017, 06:14 PM

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?

3 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 13 Mar 2017, 09:26 AM
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.
0
MBEN
Top achievements
Rank 1
Veteran
answered on 13 Mar 2017, 04:07 PM

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>
0
Peter Milchev
Telerik team
answered on 16 Mar 2017, 12:32 PM
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.
Tags
ComboBox
Asked by
MBEN
Top achievements
Rank 1
Veteran
Answers by
Peter Milchev
Telerik team
MBEN
Top achievements
Rank 1
Veteran
Share this question
or