Is it possible to use a page-property as Datasource/DataSourceID for a ListBox or other controls like a Telerik RadCombobox?
I’m having a issue to bind data to a Telerik RadCombobox defined in a FilterTemplate of a RadGrid. I created a property in the code-behind of my page and want to access it this way.
<telerik:GridBoundColumn [...]>
<FilterTemplate>
<telerik:RadComboBox
ID="filter"
AutoPostBack="false"
AppendDataBoundItems="true"
DataSourceID="<%# PropertyInTheCodeBehind %>"
runat="server" />
[...]
</FilterTemplate>
Or is there another way to accomplish this?
I just want to access data in the code-behind.
Rather define a method or an array and pass it to the DataSource property of the combo. Here are a couple of examples: