Hi,
I'm using the ListBox control with the Scheduler one, so when the user drags an item with description from the ListBox and drops it into the scheduler a new appointment is created. I saw the Demo you provide, however, this one uses plain RadListDataItem and RadListVisualItem. On the description of each item there's a phone number. I have created a new "Add Appointment" form to hold the phone number. My Question is: how can I Drag&Drop ListBox Items with descriptions and retrieve not only the Item text but the description too?
I've tried the following code, but "item" is always null.
Thank you very much for your time and attention,
Matias.
I'm using the ListBox control with the Scheduler one, so when the user drags an item with description from the ListBox and drops it into the scheduler a new appointment is created. I saw the Demo you provide, however, this one uses plain RadListDataItem and RadListVisualItem. On the description of each item there's a phone number. I have created a new "Add Appointment" form to hold the phone number. My Question is: how can I Drag&Drop ListBox Items with descriptions and retrieve not only the Item text but the description too?
I've tried the following code, but "item" is always null.
PrivateSubradListBox1_MouseMove(ByValsenderAsObject,ByValeAsMouseEventArgs)Ife.Button <> MouseButtons.LeftThenReturnEndIfIfMe.isDraggingThenReturnEndIfDimcurrentPositionAsPoint = e.LocationIf(Math.Abs(currentPosition.X -Me.mouseDownPosition.X) >= SystemInformation.DragSize.Width)OrElse(Math.Abs(currentPosition.Y -Me.mouseDownPosition.Y) >= SystemInformation.DragSize.Height)ThenMe.isDragging =TrueDimdragObjectAsNewDragObject()DimitemAsDescriptionTextListVisualItem =TryCast(Me.LBox1.ElementTree.GetElementAtPoint(e.Location), DescriptionTextListVisualItem)Ifitem IsNotNothingThendragObject.Values.Add(AppointmentFields.Summary, item.Text)dragObject.Values.Add(AppointmentFields.Description, item.DescriptionText)dragObject.Status = AppointmentFields.SummaryTryCast(sender, RadListControl).DoDragDrop(dragObject, DragDropEffects.Copy)EndIfEndIfEndSub
Thank you very much for your time and attention,
Matias.