First, I load up some data: After that, I’m doing some work to make my Grid View look beautifull, adding all columns by hand.But for this demo, I’ll show you the simple version, that also doesn’t work 🙂Let’s bind the data to our Grid View and have it autogenerate our columns, as well as an edit button.If the new price exceeds these bounds then the message "You cannot change a product's price to more than twice what it was before" is displayed.
The problem is, I’d very much like to do so, if ASP. But I can’t set a Data Source property or anything on the Sql Data Source!!! I probably have to read the cells on the Grid View of the selected row, find the controls, get the values from those and insert those into my Data Set.
At this point, the grid has been sorted and paged a number of times, yet the "The product Chang has been updated" message remains at the top of the screen.
Another concern is that any formatting changes to the Label are also remembered across postbacks.
Therefore, unless it is explicitly set back to Black subsequent messages will be displayed in a red font.
The following screenshots illustrate this behavior. In the first screenshot, the user has attempted to update the Aniseed Syrup product's price to a value more than twice the original value (.00).Such messages are typically displayed using a single Label Web control.