DataGrid Example with Linq and SQL Server

2 posts, 0 answers
  1. Piyush Goriya
    Piyush Goriya avatar
    1 posts
    Member since:
    Jul 2009

    Posted 22 Jul 2009 Link to this post

    Requirements

     

    .Net Framework

    3.5

    Visual Studio version

    2008 

    Programming Language

    C#


    PROJECT DESCRIPTION
    Only an example of using Linq to SQL with the Datagrid control

     

    DataClasses1DataContext db = new DataClasses1DataContext();

     

     

    var query = from p in db.Mst_Reconcilations

     

     

    where p.Pat_Last_Name.StartsWith("A") && p.Pat_First_Name.StartsWith("C")

     

     

    select new CustomerOrderResult

     

    {

    ID = p.ID,

    AccNo = p.Acc_No,

    CharNo = p.Chg_No,

    FName = p.Pat_First_Name,

    LName = p.Pat_Last_Name,

    DOS = p.DOS

    };

    dataGridView1.DataSource = query;

    dataGridView1.Columns[0].Visible =

    false;

     

  2. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 23 Jul 2009 Link to this post

    Hello Piyush Goriya,

    Thank you for your submission. Since it uses no Telerik controls, it has been moved to the our General Forums.

    In case you have some additional time on your hands, we will very appreciate an example of using LINQ with our RadGridView control.

    Thanks.


    All the best,
    Vassil
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top