What is a dataconverter?

2 posts, 1 answers
  1. Rod
    Rod avatar
    71 posts
    Member since:
    Jan 2011

    Posted 12 Sep 2013 Link to this post

    I'm trying to figure out how to use a Telerik ListBox control for an application that I'm writing. For some reason I can't view any of the Telerik demos (they're all timing out on me), and so I've been searching around this site for other help. I came across this page on drag-and-drop for the ListBox, and it looks really promising. However, in reading through the code on the page I came across their ProductToOrderConverter class. It inherits (or implements, I'm not sure which) from something called a DataConverter. What is that?? Even on this site I'm having a hard time finding any documentation on what the dataconverter class/interface is.
  2. Answer
    Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 17 Sep 2013 Link to this post

    Hello Rod,

    The DataConverter is abstract class that is used with DragDropManager's behaviors. DragDropManager helps you to implement Drag-Drop functionality in your application. You can read more information about it here. We provide and easy way to implement DragDrop in RadListBox via ListBoxDragDropBehavior. But you may need to drag an item from one RadListBox and Drop it in another one, which has a collection of other object types. In such scenarios you have to use a DataConverter implementation in order to be able to drop the data in the second RadListBox. The dragged data should be converted as described here. In our API Reference you may find more information about DataConverter class.

    Hopefully this helps.

    Rosen Vladimirov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top