New to Telerik UI for WinForms? Start a free 30-day trial
Adding items programmatically
Updated over 6 months ago
RadDomainUpDown supports adding items at run time, which means that you can manually populate it with data. The following example demonstrates how to add three items to the RadDropDownList.Items collection specifying the text and image.
Add items programmatically
C#
RadListDataItem itemBulgaria = new RadListDataItem();
itemBulgaria.Text = "Bulgaria";
itemBulgaria.Image = Properties.Resources.BUL;
this.radDomainUpDown1.Items.Add(itemBulgaria);
RadListDataItem itemCanada = new RadListDataItem();
itemCanada.Text = "Canada";
itemCanada.Image = Properties.Resources.CA;
this.radDomainUpDown1.Items.Add(itemCanada);
RadListDataItem itemGermany = new RadListDataItem();
itemGermany.Text = "Germany";
itemGermany.Image = Properties.Resources.DE;
this.radDomainUpDown1.Items.Add(itemGermany);