How to retain the original value of dropdow?
-
I have to update a table based on some values in different dropdowns. One of these values is part of composite primary key also. In row_updating event, I have written the code to update the tabel. Update table xyz set order=order_dropdown.selectedvalue, some more values... where emp_id=3,order=order_dropdown.selectedvalue. Now in "where" and "set" clauses, order_dropdown.selectedvalue has used. "where" should pick up the old value ideally but it will pick up latest value. Due to this, updation does not take place. So how to capture the original value in row_editing event and pass that original value in row_updating event?
-
I have to update a table based on some values in different dropdowns. One of these values is part of composite primary key also. In row_updating event, I have written the code to update the tabel. Update table xyz set order=order_dropdown.selectedvalue, some more values... where emp_id=3,order=order_dropdown.selectedvalue. Now in "where" and "set" clauses, order_dropdown.selectedvalue has used. "where" should pick up the old value ideally but it will pick up latest value. Due to this, updation does not take place. So how to capture the original value in row_editing event and pass that original value in row_updating event?
You want to get a value other than the value that has been selected ? How do you hope to do that ? You're going to have to store it somewhere. If you mean it's reseting and is NOT the selected value, it's because you're binding the datasource on postback in your page load.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
You want to get a value other than the value that has been selected ? How do you hope to do that ? You're going to have to store it somewhere. If you mean it's reseting and is NOT the selected value, it's because you're binding the datasource on postback in your page load.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.