I have a datagrid view control in the WinForms app on which I am working.
Datasource is set to the IQueryable that I get from our service layer:
dataGridView1.DataSource = (select from c_customerService.GetAll (c); < / Code>
For example, I am working, I have a cancel button which I want to use to return the changes. If they cancel, I do not call on the constellation.Cebtax.Cebit Changes () and I close the form. However, when I return the form The data displayed in the DataGride view reflects a change in what I had canceled on the previous form.
When I close the program and run it again, then everything Okay, so I believe that I am changing the data in the collection which is bound to the DataGrid view.
Definitely this is a clear solution of this and looks as my ignorance
Ian
Div class = "post-text" itemprop = "text">
I believe you retrieve data To dodge the database again. Meaning, if you feel that the user has decided to cancel their changes, then you will have to go back to the database and get a new IQueryable. The way Linq to Sql works, you can only calculate the collection once. Therefore, if you only want to return to the changes, then you can not do this because it can not explain it again
Personally, I probably can not use the DataGrid view, so that Users can make changes directly I have always felt like I am less in control like this. I probably have any input forms, where users can either enter new data or edit existing records, instead giving them the ability to edit the grid directly which edits the database directly.
Comments
Post a Comment