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

Custom attributes Databind

1 Answer 102 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 19 Apr 2013, 02:07 PM

Hello Community,

 

i have a question about the custom attributes.

For example, I want to bind an Item with 3 attributes. A Text, Value and a Custom Attribute.

The Data come from a Datatable. I need to do this Server Side.

The custom attribute don't need to be visible.
It's just a second ID.


I tried this:

Define

        Dim dtBank As DataTable = Allgemeines.GETBank()

        If dtBank.Rows.Count > 0 Then

            rcbBankID.DataSource = dtBank

            rcbBankID.DataBind()

'Maybe this is totaly wrong

            For Each drBank As DataRow In dtBank.Rows

                rcbBankID1.Attributes.Add("BLZ", drBank("BLZ"))

            Next

        End If

 

Use                      

        Dim strTest As String = rcbBankID.SelectedItem.Attributes("BLZ").ToString


I hope you understand me.

Thank you for your Help
Daniel

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 22 Apr 2013, 12:00 PM
Hello Daniel,

I would suggest that you refer to the following help article where you can find different approaches that you can use to create custom attribute to the items of the RadComboBox control - Custom Attributes

Greetings,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Daniel
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or