Keep changed value in cell when sorting and before saving in DataGridView
I have a datagridview With bindingsource where I list many Products, and in the first cell the user can enter how many items they want of each Product in the quantity cell, and then they click the "Order" button.
The problem is when the user has set how many Items they want and then want to sort by name, the values in the quantity cell is gone.
How is the most easy way to keep the entered quantity values when they sort the Grid ?
Sounds like you are not storing the value entered by the user back to the datasource. What is the code you are using to trigger the editing of the cell and saving the value entered.
No code at that point, the Cell is just open for editing.
The saving happens when you hit the button "Send order". Then I loop all the rows and check if the row has got a Quantity, if it has, I save the Quantity and the productID of the row.
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
-saige-