3 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 20 Nov 2008, 09:48 AM
Hi,
You can enable html formatting for the ComboBoxItems as shown in the code below.
cs:
And if you would like to validate your combobox so that the combobox is not left empty, then you can use a RequiredFieldValidator as shown below:
Thanks
Princy.
You can enable html formatting for the ComboBoxItems as shown in the code below.
cs:
| <telerik:RadComboBox ID="RadComboBox1" AutoPostBack="true" HighlightTemplatedItems="true" AllowCustomText="true" DataSourceID="SqlDataSource2" DataTextField="Category" DataValueField="Category" runat="server" > |
| <ItemTemplate> |
| <b> <%# DataBinder.Eval(Container.DataItem, "Category")%></b> |
| </ItemTemplate> |
| </telerik:RadComboBox> |
And if you would like to validate your combobox so that the combobox is not left empty, then you can use a RequiredFieldValidator as shown below:
| <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="RadComboBox1" runat="server" ErrorMessage="RequiredField"> |
| </asp:RequiredFieldValidator> |
| <telerik:RadComboBox ID="RadComboBox1" AutoPostBack="true" HighlightTemplatedItems="true" AllowCustomText="true" DataSourceID="SqlDataSource2" DataTextField="Category" DataValueField="Category" runat="server" > |
| <ItemTemplate> |
| <b> <%# DataBinder.Eval(Container.DataItem, "Category")%></b> |
| </ItemTemplate> |
| </telerik:RadComboBox> |
Thanks
Princy.
0
y
Top achievements
Rank 1
answered on 20 Nov 2008, 03:34 PM
Hi,
Thanks for responding.
I would like to load the RadComboBox from vb.net code.
here is what I have done so far:
I am calling a stored procedure and looping through a SQLDataReader
Thanks for responding.
I would like to load the RadComboBox from vb.net code.
here is what I have done so far:
I am calling a stored procedure and looping through a SQLDataReader
Public
Shared Sub DDLTklRadFillAvailableTables(ByVal tlkRadDDLAt As RadComboBox)
While myRdr.Read
Dim item1 As New RadComboBoxItem()
strItemText =
"Table " + myRdr("TableNumber").ToString + myRdr("DuplicateTableNumberSuffix").ToString
strItemText +=
" " + myRdr("ShortDescription").ToString.Replace("'", "`")
strItemText +=
" " + myRdr("SeatingSection").ToString.Replace("'", "`")
strItemText += "(" + myRdr("SeatsAvailable").ToString + " Seat(s) Avail)"
item1.Text = strItemText
item1.Value = myRdr(
"TableID").ToString
tlkRadDDLAt.Items.Add(item1)
End While
End Sub
this works quite well - I would now like to put html tags into the text.
0
Rogério
Top achievements
Rank 2
answered on 30 Sep 2009, 02:59 PM
I'm having the same problem.
I would like to put on bold the letters that the user writes on the combobox when populating the combobox with values from SQL datatable using the OnItemsRequested option.
Anyone ever did this?
I would like to put on bold the letters that the user writes on the combobox when populating the combobox with values from SQL datatable using the OnItemsRequested option.
Anyone ever did this?