Solved

WPF Devexpress Grid Update

Posted on 2014-03-31
1
207 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
1 Comment
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 500 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now