Drag and Drop with C1List

Posted by: dean.bashore on 25 January 2022, 4:30 pm EST

  • Posted 25 January 2022, 4:30 pm EST

    Hello

    I am using a C1List bound to a database table with “canned messages”. Two columns Description and Message. Like a key/value pair,

    I need to be able to select a row and drag the text string from the message column to the text box. I have seen lots of examples like this

    DragDrop.DoDragDrop(listbox1, listbox1.SelectedItem.ToString(), DragDropEffects.Copy);
    

    from the windows listbox control but there is no selected item property available for me to get the data in row(s). How do I accomplish this with your control?

  • Posted 27 January 2022, 3:27 am EST

    Hi,

    You can handle the MouseDown event of the C1List to start the DragDrop operation and get the selected text of the required column using the C1List.Columns.Text property. Then you can handle the DrapDrop event of the TextBox to set its text according to the dragged text. Kindly refer to the attached sample.

    Regards

    Avnish

    DragDrop_C1List.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels