Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

How do I save changes in datagridview

$
0
0

I have 2 datagridviews that show hierarchical data. They use object as datasourse.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sandbox
{
    public class Customer
    {
        public int ID { get; set; }
        public string Company { get; set; }
        public List<Order> Orders { get; set; }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sandbox
{
    public class Order
    {
        public int ID { get; set; }
        public string CustomerPO { get; set; }
    }
}

When I edit data in dgv for orders and then change cells in customer the orders are not saved.


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>