Gridview rowupdating newvalues count 0
Still I will let you discover them and invent new ones.We are going to make our row editable on double click and in order to achieve that we will write down a function (in Java Script) that is going to be associated to the grids client side event called Row Dbl Click. At first we will add in our ASPX file, inside the grid definition a new section that is called Client Side Events (as we already did for other controls) and it will look like: It is that simple!Last but not least you will need the 12.2.5 version of Dev Express ASP. If you do have a more recent version, upgrading the project should be easy.Check this post about how to get the Dev Express controls and on how to eventually upgrade the project No more code is necessary for managing data and we can now comfortably start with the interface. There are several methods for achieving the same result.If you are interested in more you can check this Grid Editing – Edit Modes A rich set of editors for different column types allows column values to be modified with ease.
You can find on Devexpress support web site several issues that are speaking about this behavior and why of it. Define the following server side event: What we defined here is checking if the cells that are going in edit mode are the one we are aiming to put in edit (not the Name and Total columns) and if so we are setting a couple of properties.The properties are called logically New Values and Old Values.As Ordered Dictionaries are not so handy for processing, I will create two Hashtables and copy the data for both properties from Ordered Dictionaries to Hashtables.As first, we are indicating the cell as read only, after that we are casing the control to an ASPx Text Box (which is the right control for these columns) and setting several parameters in order to make the editing look proper.The most important thing is that we are assigning to each of editing cells a client side event Key Down, in which we will manage the persistence. If Enter (13) key is pressed meanwhile we are in one of editing cells, we will prevent the defaults for this action and call Update Edit method on our grid.