.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> WPF >> Post New QuestionBookmark and Share Subscribe to Forum

Datagrid view in Wpf

Posted By: Maya     Posted Date: May 15, 2012    Points:5   Category :WPF
how to insert ms access database values into datagrid in wpf

Responses
Author: Mohanraj             
Posted Date: July 17, 2012     Points: 20   

Hi,

First get the data from the database using the linq query

e.g

var query= from value in db.tablename
select value

and then bind the query value to the datagrid


datagrid.DataContext=query.ToList();


you can also arrange the columns in any order by specifying the binding path in the datagrid column header


Regards,
mohanraj



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend