Making the input field of RadMultiColumnCombobox readonly
Environment
Product | RadMenu for ASP.NET AJAX |
Description
See how to make the RadMultiColumnCombobox textbox read-only while keeping the dropdown selection functionality operational.
Solution
The solution shows how to get a reference to the textbox and set its readonly attribute:
<script>
function OnClientLoad(sender, args) {
$telerik.$(".k-input")[0].setAttribute("readonly", "true");
}
</script>
<telerik:RadMultiColumnComboBox ClientEvents-OnLoad="OnClientLoad" runat="server" ID="RadMultiColumnComboBox3"
DataTextField="ShipName" DataValueField="OrderID" DataSourceID="SqlDataSource1"
Width="100%" DropDownWidth="600">
<ColumnsCollection>
<telerik:MultiColumnComboBoxColumn Field="OrderID" Title="OrderID" />
<telerik:MultiColumnComboBoxColumn Field="Freight" Title="Freight" />
<telerik:MultiColumnComboBoxColumn Field="ShipName" Title="ShipName" />
</ColumnsCollection>
<PopupSettings />
</telerik:RadMultiColumnComboBox>