Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello House,

I have a C# winform, i am using linq to retrieve record from database, if a user clicks on a record, a form is shown on showdialog that populates that record information on a textbox, which the decides either to delete or update the record, and also a link to create new record, i want to be able show on the gridview the new record, or the updated record, or that a role has been deleted without closing the main form. Is there anywhere i can achieve this?

i have tried this:

C#
var dbEntities = new NewSchoolCoreEntities( );
            var BindingSource = from a in dbEntities.devices 
                                select new {
                                    IdDevice = a.id,
                                    DeviceType = a.device_type_name,
                                    DeviceName = a.device_name,
                                    ModelNumber = a.model_number ,
                                    MacAddress = a.mac_address,
                                    IsActive = a.device_active,
                                    IsInUse = a.in_use 
                                };
            var bindingSource = new BindingSource( );
            bindingSource.DataSource = BindingSource.ToList();
            dataGridView1.DataSource=bindingSource;


but not working! any contribution will be appreciated. Thanks.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900