Hi,
I created one question paper using listbox in silverlight. now i want to implement paging for it. i am fetching data from database in to listbox. for that i return dataset in websevice and i attach that to listbox. now i took datapager control to implement the paging . but i am not able to implement . can any body help me
Thanks & Regards
P.Nagaraju
Paging with datapager control for Listbox in Silverlight
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Priya LingeRank #785 · 2.9K reputationPosted Aug 1, 2011, 4:22 AM EDT
Try this.
public MainPage()
{
InitializeComponent();
getdata();
}
public void getdata()
{
ServiceReference1.Service1Client ser = new ServiceReference1.Service1Client();
ser.DoWorkCompleted += new EventHandler
ser.DoWorkAsync();
}
void ser_DoWorkCompleted(object sender, ServiceReference1.DoWorkCompletedEventArgs e)
{
PagedCollectionView pcv = new PagedCollectionView(e.Result);
dataPager1.Source = pcv;
dataPager1.PageSize = 3;
listBox1.ItemsSource = pcv;
//listBox1.ItemsSource = e.Result;
listBox1.DisplayMemberPath = "Name";
}
Please see attached file.
Hope this will help you.
Thanks.
nagaraju84 reputationPosted Aug 1, 2011, 8:22 PM EDT
Dinesh BeniwalRank #9 · 64K reputationPosted Aug 1, 2011, 8:25 PM EDT
If your query is solved then Mark as Accepted answer.
Thanks