This question is locked. New answers and comments are not allowed.
Hi,
I have developed a grid which has paging in it, it works fine for me, but when I try to convert the QueryableCollectionView to a list it returns null value, is there a way to convert that.
Please find my coding below
I get an error in
because the grid source is not of type list<ApuandPeopleSoft> but of type QueryableCollectionView. but when i convert that to QueryableCollectionView I will not be able to calculate the time span because i am not able to convert that to List of AouandPeopleSoft. Can u please let me know as how this needs to be handled?
I have developed a grid which has paging in it, it works fine for me, but when I try to convert the QueryableCollectionView to a list it returns null value, is there a way to convert that.
Please find my coding below
RadDataPager objRadDataPager = new RadDataPager();
objRadDataPager.Name = "radPager1";
objRadDataPager.Height = 25;
objRadDataPager.PageSize = 4;
objRadDataPager.IsTotalItemCountFixed = true;
objRadDataPager.DisplayMode = PagerDisplayModes.All;
objRadDataPager.Width = double.NaN;
objRadDataPager.BorderThickness = new Thickness(2);
QueryableCollectionView qcv = new QueryableCollectionView(lstApuandPeopleSoft.ToList().OrderBy(x => x.StartTime).ToList());
objRadDataPager.Source = qcv;
grdProcessLog.ItemsSource = qcv;
IList<
ApuandPeopleSoft
> objAutomationIDEItems12 = grdProcessLog.ItemsSource as List<
ApuandPeopleSoft
>;
summation = 0;
foreach (var item in objAutomationIDEItems12)
{
TimeSpan tss = getTimeSpan(item.TotalTime);
summation += tss.TotalSeconds;
}
TimeSpan t = TimeSpan.FromSeconds(summation);
txttotalhrs.Text = string.Format("{0:D2}: {1:D2}: {2:D2}",
t.Hours,
t.Minutes,
t.Seconds);
IList<
ApuandPeopleSoft
> objAutomationIDEItems12 = grdProcessLog.ItemsSource as List<
ApuandPeopleSoft
>;
because the grid source is not of type list<ApuandPeopleSoft> but of type QueryableCollectionView. but when i convert that to QueryableCollectionView I will not be able to calculate the time span because i am not able to convert that to List of AouandPeopleSoft. Can u please let me know as how this needs to be handled?