Hi all,
If I have a static item such as:
I see this item in e.SourceDragItems when this function is called:
But, if I add an item to the ListBox at run time:
I see currentItem in my RadListBox, but when I drag the item it says that SourceDragItems is 0. How can I fix this?
Sean
EDIT: It seems if I add to the list box during Page_Init then they show up.
If I have a static item such as:
<Items><telerik:RadListBoxItem Text="Test" /></Items>I see this item in e.SourceDragItems when this function is called:
protected void RadListBox_Dropped(object sender, RadListBoxDroppedEventArgs e){ foreach( RadListBoxItem item in e.SourceDragItems) { RadDock dock = CreateRadDock(); dock.Tag = item.Text; dock.Title = dock.Tag + CurrentDockStates.Count.ToString(); LoadContent(dock); RadDockZone1.Controls.Add(dock); }}But, if I add an item to the ListBox at run time:
protected void LoadHistoricalReports( ReportServicesProxy.HistoricalReport[] historicalReports ){ RadListBox2.Items.Clear(); foreach( var report in historicalReports ) { RadListBoxItem currentItem = new RadListBoxItem(report.Name); RadListBox2.Items.Add(currentItem); }}I see currentItem in my RadListBox, but when I drag the item it says that SourceDragItems is 0. How can I fix this?
Sean
EDIT: It seems if I add to the list box during Page_Init then they show up.