Custom Grid LINQ to SQL help
Posted
by
user488361
on Stack Overflow
See other posts from Stack Overflow
or by user488361
Published on 2011-01-01T03:46:51Z
Indexed on
2011/01/01
3:54 UTC
Read the original article
Hit count: 247
Following is my custome cotrol grid...
public partial class LinqGrid : UserControl
{
object tmpDataTable = new object();
public LinqGrid()
{
InitializeComponent();
}
public void Bind(System.Data.Linq.Table listSource) where T : class
{
Project.dbClassesDataContext dbc = new Project.dbClassesDataContext();
tmpDataTable = listSource;
var query = (from c in listSource select c);
dgvRecords.DataSource = query.Take(10).ToList();
}
private void btnNext_Click(object sender, EventArgs e)
{
// now what i have to do here if i want next 10 records.....means how to retrive tmpDataTable object here... ??? i can't find Type of variable....?? plz help me....
}
}
© Stack Overflow or respective owner