This is a migrated thread and some comments may be shown as answers.

How to bind the datasource through javascript

3 Answers 540 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Dhamodharan
Top achievements
Rank 1
Dhamodharan asked on 27 Nov 2012, 01:22 PM
Hi,
How to bind datasource to the radlistview through javascript?







Thanks

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Nov 2012, 09:43 AM
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.
0
Dhamodharan
Top achievements
Rank 1
answered on 28 Nov 2012, 09:52 AM
Hi,
  When i assign datasource to listview it shows as -  Object doesn't support property or method 'set_dataSource'

Thanks
0
Shinu
Top achievements
Rank 2
answered on 29 Nov 2012, 05:22 AM
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.
Tags
ListView
Asked by
Dhamodharan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Dhamodharan
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or