Ajay Kumar

Ajay Kumar

  • NA
  • 10
  • 0

Problem in calling Linq method which return group by result on page load

Nov 22 2010 5:52 AM

Hi,
I hv method in class file and i need to call it on page load...I just want to knw what shud be exact return type  here...

 
public static void GetPaymentGroupBy()
{
DataClasses1DataContext obj = new DataClasses1DataContext();
var query = (from pay in obj.GetTable<Payplan_Installment>()
group pay.Frequency by
new
{
pay.InstallmentAmount,
pay.PaymentMode,
pay.PlanStatus
}
into details
select details);
}
 
===
I m calling on page load like this:
dataGridView1.DataSource =
DataClasses1DataContext.GetPaymentGroupBy();
please help me,it is very urgent
Thanks in advance

Answers (4)