How to bind the datasource through javascript

4 posts, 0 answers
  1. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 27 Nov 2012 Link to this post

    Hi,
    How to bind datasource to the radlistview through javascript?







    Thanks
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Nov 2012 Link to this post

    Hi dhamodharan,

    RadListView supports client-side databinding to page methods and web services.

    JS:
    <script type="text/javascript">
        function pageLoad() {
            var listView = $find("<%= RadListView1.ClientID %>");
            listView.set_dataSource(pageData);
            listView.dataBind();
        }
    </script>

    Please take a look into this documentation and demo for more information.

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 28 Nov 2012 Link to this post

    Hi,
      When i assign datasource to listview it shows as -  Object doesn't support property or method 'set_dataSource'

    Thanks
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Nov 2012 Link to this post

    Hi dhamodharan,

    I couldn't replicate your issue at my end. With reference to this documentation From Q1 2012 on RadListView supports client-side databinding with the help of a new javascript templating engine. please make sure that you are using the latest version of RadControls.

    Hope this helps.

    Regards,
    Shinu.
Back to Top