This is a migrated thread and some comments may be shown as answers.

DataGrid Example with Linq and SQL Server

1 Answer 137 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Piyush Goriya
Top achievements
Rank 2
Piyush Goriya asked on 22 Jul 2009, 08:43 AM

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;

 

1 Answer, 1 is accepted

Sort by
0
Vassil Petev
Telerik team
answered on 23 Jul 2009, 08:51 AM
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.
Tags
General Discussions
Asked by
Piyush Goriya
Top achievements
Rank 2
Answers by
Vassil Petev
Telerik team
Share this question
or