Best way to rebind data?

2 posts, 0 answers
  1. Pierre
    Pierre avatar
    227 posts
    Member since:
    Apr 2007

    Posted 17 Apr 2013 Link to this post

    I currently run some test to see if we can use Telerik Kendo Web on a very specific application. 

    The programmers team need to send data to Telerik control without to many Framework UI "Black Box".  Its ok for him to rebind manually the date when a particular event come.

    When we create the control:
        dataTextField: "Nom",
        dataValueField: "Id",
        dataSource: Module.Collection,
        filter: "contains",
        suggest: true,
        index: 1
    Module.Collection connait a lits of object. After the creation, what is the best way to refresh the combobox manually? I can recall the kendoComboBox function and recreate the combobox, but that cause a small visual glitch.

    Any suggestion?
  2. Alexander Valchev
    Alexander Valchev avatar
    2887 posts

    Posted 18 Apr 2013 Link to this post

    Hi Pierre,

    Recreating the widget is not supported and will certainly cause issues. Please use the DataSource API methods instead. For example you can replace the ComboBox' list of objects through the data method. Add, insert and remove methods will allow you to add or remove single data items.

    Alternatively you may use the setDataSource method of the widget to completely rebind it.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top