Asp net objectdatasource updating event

21 Dec

Note that you can’t delete genres that have one or more reviews attached to them. Chapter 15 digs much deeper into changing the user interface (UI) to disable the Delete links so users can no longer accidentally click them.

(visible in Figure 13-5), to sort the data in the grid on that column.

The You didn’t manually write any code to interact with the database in this exercise, but you got a lot of functionality simply by dragging and dropping a database table.

To see how it works, take a look at the source that VS generated.

VS is just cautious and adds them to all columns and tables.

You can leave them in, but if you write your own SQL statements you don’t have to include them (although you could if you wanted to).

w=800" src="https://taditdash.files.wordpress.com/2014/06/debugger-inside-gridview-rowupdating-event.png? w=800&h=359" alt="Debugger Inside Grid View Row Updating Event" width="800" height="359" class="size-full wp-image-328" srcset="https://taditdash.files.wordpress.com/2014/06/debugger-inside-gridview-rowupdating-event.png? w=230" src="https://taditdash.files.wordpress.com/2014/06/gridview-on-browser.png? w=800" alt="Grid View on Browser" class="size-full wp-image-335" srcset="https://taditdash.files.wordpress.com/2014/06/230w, https://taditdash.files.wordpress.com/2014/06/gridview-on-browser.png? w=416" src="https://taditdash.files.wordpress.com/2014/06/gridview-cell-showing-updated-value.png? w=800" alt="Grid View Cell Showing Updated Value" class="size-full wp-image-331" srcset="https://taditdash.files.wordpress.com/2014/06/416w, https://taditdash.files.wordpress.com/2014/06/gridview-cell-showing-updated-value.png?

The student class is the class to be used with an object data source.

This class has three properties: a student id, name, and city.

All by itself, the controls work together closely to retrieve and modify the data in the underlying data source.

To give you an idea of how this works, here’s a rundown of the events that took place when you requested the Genres page in the browser and then edited a single genre: 1.