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

Combo Custom Attribute

3 Answers 98 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Cush
Top achievements
Rank 1
Cush asked on 22 Mar 2011, 02:18 PM
Hi All

I am currently using the method below to poulate a combobox on the page load event:

Dim dataAdapter as new SetTableAdapter.someidentityTableAdapter
Dim adapterTable as DataTable
  
adapterTable = dataAdapter.getData()
  
Radcombo1.DataValueField = "Value1"
Radcombo1.DataTextField = "Value2"
Radcombo1.DataSource = adapterTable
Radcombo1.DataBind()

I would like to add a custom attribute to this combo box,
I am able to achive this in a load on demand senario but not the senario above!
Would someone be kind enough to point me in the right direction on how to achive this please?

Also when using custom attributes in this way is it still only possible to get the attributes value client side?

Many Thanks

Regards

Darren

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Mar 2011, 11:45 AM
Hello,


You could add the "Custom Attribute" in ItemDataBound event of RadComboBox. In the ItemDataBound event get the field value and set the custom attribute as shown in the follwoing documentation.
ItemDataBound



Thanks,
Princy.
0
Cush
Top achievements
Rank 1
answered on 23 Mar 2011, 02:12 PM
Hi Princy

Thanks for that,
I did see that before but didt try it as it looked too easy !!!!!!

Anyway that worked a treat thank you,

All i have got to do now is get the selected item Custom Attribute value on page load.

Many Thanks

Regards

Darren
0
Kate
Telerik team
answered on 25 Mar 2011, 10:07 AM
Hello Cush,

I would suggest that you take a look at the following help article:Custom Attributes. I believe it describes the diffrent scanarios that may be very helpful to you.

Best wishes,
Kate
the Telerik team
Tags
ComboBox
Asked by
Cush
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Cush
Top achievements
Rank 1
Kate
Telerik team
Share this question
or