Hi i am wondering if you coud please help me too i am having the same type of problem as Bridge23,
I am trying to do a Linq to a Cached DataTable, i am quite new to Linq...
I emulated his code from the solution you gave to Bridge23, the only thing i am doing differently is that i am storing my dataset in a cache instead of a session...can this be the problem i really thing not ...here is my code
and below it is the error i am receiving :
DataSet ds = (DataSet) Cache["dsResult"];DataTable dt = ds.Tables[0]; var query = from c in dt.AsEnumerable()
select new
{
SecurityCode = c.Field<string>("SecurityCode"),
SecurityName = c.Field<
string>("SecurityName"),Currency = c.Field<string>("Currency"),
Product = c.Field<
string>("Product"),CountryIssue = c.Field<string>("CountryIssue"),
Location = c.Field<
string>("Location"),Tag = c.Field<string>("Tag"),
AvgBorrowCost = c.Field<
string>("AvgLoanCost"),AvgLoanCost = c.Field<string>("AvgLoanCost"),
AvgBorrowRebate = c.Field<
string>("AvgBorrowRebate"),AvgLoanRebate = c.Field<string>("AvgLoanRebate"),
Price = c.Field<
string>("Price"),SettledTotal = c.Field<string>("SettledTotal"), SettledValue = c.Field<string>("SettledValue"),
//PendingDate1 = c.Field<string>("PendingDate1"),
//PendingValue1 = c.Field<string>("PendingValue1"),
//NetDate1 = c.Field<string>("NetDate1"),
//NetValue1 = c.Field<string>("NetValue1"),
//PendingDate2 = c.Field<string>("PendingDate2"),
//PendingValue2 = c.Field<string>("PendingValue2"),
//NetDate2 = c.Field<string>("NetDate2"),
//NetValue2 = c.Field<string>("NetValue2"),
//PendingDate3 = c.Field<string>("PendingDate3"),
//PendingValue3 = c.Field<string>("PendingValue3"),
//NetDate3 = c.Field<string>("NetDate1"),
//NetValue3 = c.Field<string>("NetValue1"),
////pending and net 4 to 22 hereTotal = c.Field<string>("Total"),
};
gvPositionManager.DataSource = query;
gvPositionManager.DataBind(); //Error occurs at this point! but i though a Datable does support Sever-side paging??
}
Error i get is:
The data source does not support server-side data paging
This above all: to thine own self be true.
William shakespeare, Hamlet