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

Initial filtering for client-side bound listview

1 Answer 44 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Rayko
Top achievements
Rank 1
Rayko asked on 19 Sep 2012, 11:02 AM
Hi,

I've created a client-side bound listview which gets its data from a web services. Currently as I understand it's possible to pass only 4 parameters to the web service (StartRowIndexParameter, MaximumRowsParameter, FilterParameter, SortParameter).
Because I need to pass additional parameters I'm using the FilterParameter where I put these into by a concatenated string.
Is there an option to set the FilterParameter initially? Or how can I pass additional parameters to the web service in a better way?

Best regards
Rayko

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 24 Sep 2012, 10:45 AM
Hi Rayko,

With the declarative client-side binding you cannot pass any additional arguments, as the RadListView control does not know what arguments you need and from where to get their values automatically.

Instead, you should use manual data-binding where you can make an AJAX call to the web service with the needed parameters and assign the result using the set_dataSource() function.

Programmatic client-side binding of RadListView is demonstrated here:
http://demos.telerik.com/aspnet-ajax/listview/examples/client/programmaticdatabinding/defaultcs.aspx
The example uses page methods for binding, but the only difference is that you would need to modify this part of the script to call your web service, the logic for extracting sort/filter expressions is the same.


Greetings,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListView
Asked by
Rayko
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or