I am looking to create a mutli-column ComboBox like the Real Estate Agency ComboBox found in this example: http://demos.telerik.com/aspnet-ajax/Combobox/Examples/Default/DefaultCS.aspx, but I need to create the ComboBox at runtime. The data also needs to be bound to the ComboBox when the ItemsRequested Event is called. I've tried the following:
But no matter what I do with the templates the columns never show up and the row values are always squeezed together. For example three column row values that should read something like "Val1 Val2 Val3" under three columns looks like "Val1Val2Val3".
Is it possible to get an actual working sample where to creating a ComboBox like the one in the example I linked at runtime?
protected void Lookup_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) |
{ |
combo.ItemTemplate = new LookupComboItemTemplate(table); |
combo.HeaderTemplate = new LookupComboTemplate(table); |
combo.DataSource = table; |
combo.DataBind(); |
foreach (RadComboBoxItem item in combo.Items) |
{ |
item.DataBind(); |
} |
} |
But no matter what I do with the templates the columns never show up and the row values are always squeezed together. For example three column row values that should read something like "Val1 Val2 Val3" under three columns looks like "Val1Val2Val3".
Is it possible to get an actual working sample where to creating a ComboBox like the one in the example I linked at runtime?