[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

WPF Devexpress Grid Update

Posted on 2014-03-31
1
Medium Priority
?
271 Views
Last Modified: 2014-10-05
Hi Experts,
I am using devexpress in my WPF application.
I have a dxg:Grid which is bound using linq. Now I want to update the records to database.

Any help is really appreciated. Thanks
MainWindow.xaml.cs
MainWindow.xaml
0
Comment
Question by:johny_bravo1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 1500 total points
ID: 40139172
change this
private void loadCustomers()
        {
            bool? deleted = false;
            callDBDataContext cd = new callDBDataContext();
            var customers = (from p in cd.TblCustomers
                             where p.IsDeleted == deleted
                             select new { p.CustomerId, p.CustomerName, p.CustomerAddress, p.ContactNo1, p.ContactNo2, p.DateOfBirth, p.Anniversary, p.IntroducerName, p.IntoducerContactNo });

            l = cd.TblCustomers.GetNewBindingList();
            gridControl1.ItemsSource = customers;

        }

Open in new window


to

private void loadCustomers()
        {
            bool? deleted = false;
            var customers = (from p in dc.TblCustomers
                             where p.IsDeleted == deleted
                             select new { p.CustomerId, p.CustomerName, p.CustomerAddress, p.ContactNo1, p.ContactNo2, p.DateOfBirth, p.Anniversary, p.IntroducerName, p.IntoducerContactNo });

            l = dc.TblCustomers.GetNewBindingList();
            gridControl1.ItemsSource = customers;

        }

Open in new window

0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question