I have an ItemTemplate defined for my RadListBox. My list box is bound to the results of a Linq to SQL Query. In this case, it's bound to objects of type MyObject.
I'd like to be able to add a new RadListIBoxItem defined by the user. Ideally, I'd like to create a new MyObject instance and call myListBox.Items.Add(new RadListBoxItem(myNewObject)). This would then create a new item and bind the values in the ItemTemplate appropriately.
Of course, this isn't an option. I can only pass a text and value to the new RadListBoxItem, and this of course won't map to many of the controls in my ItemTemplate.
So what's the correct approach here? Is this simply the wrong control to use?
I'd like to be able to add a new RadListIBoxItem defined by the user. Ideally, I'd like to create a new MyObject instance and call myListBox.Items.Add(new RadListBoxItem(myNewObject)). This would then create a new item and bind the values in the ItemTemplate appropriately.
Of course, this isn't an option. I can only pass a text and value to the new RadListBoxItem, and this of course won't map to many of the controls in my ItemTemplate.
So what's the correct approach here? Is this simply the wrong control to use?