I kinda have a problem because i would like to set the header data (titles) using the code behind.
cbxName.Header.FindControl("id") doesn't really do the trick.
Why do I need this? Well I need to set the titles in the proper languages.
YES I HAVE FOUND A SOLITION!
I think it is kinda crappy and dirty since you have to create a HeaderTemplate class for every RadComboBox you would like to do this.
class ProductSelectorHeaderTemplate : ITemplate
{
private string _artNr, _name, _brand;
public void SetHeaderTexts(string artNr, string name , string brand)
{
_artNr = artNr;
_name = name;
_brand = brand;
}
public void InstantiateIn(Control container)
{
var lt1 = new Literal() {Text = "<ul><liclass='col1'>" + _artNr + "</li>"};
var lt2 = new Literal() { Text = "<liclass='col2'> " + _name + "</li>" };
var lt3 = new Literal() { Text = "<liclass='col3'> " + _brand + "</li></ul>" };
container.Controls.Add(lt1);
container.Controls.Add(lt2);
container.Controls.Add(lt3);
}
}
I have placed this in the init of the ascx.cs file
var headerTemplate = new ProductSelectorHeaderTemplate();
headerTemplate.SetHeaderTexts("BLA", "BLABALAA", "i like banana");