However, in the long list of events fired by the Details View control, there s one that you can leverage to implement a little piece of logic to set default input values.
Next, you can use a Grid View control on another, or the same, page to retrieve any just-inserted records.
As you can see in Figure 1, input fields are empty and don t suggest any values to users.
The Item Created event is fired immediately after a Details View item is created.
(template column) to edit database with some data source control like Sql Data Source, Access Data Source, XMLData Source, Object Data Source or Site Map Data Source, it is possible to get an error like this: Cannot insert the value NULL into column 'Column Name', table 'Database Name. Eval method only send data to page, but you can't receive updated data back.
By using the Details View control you save yourself a bunch of user interface stuff.
The control provides a free table-based interface with one column for labels and one column for input fields.
Figure 1: The Details View control working in insert mode.
The Details View control lacks a property to indicate the default value of an input field. You might think that the Details View control fires an event that, properly handled, gives you a chance to set the default value of input fields. More precisely, the Details View control doesn t fire a specific event that would let you do so.
So, I hope this article helped you to solve Grid View update problem in minutes, instead of losing complete day to find out what caused this error like it happened to me :).
Remember, there’s a script file in the control that should open automatically (if it doesn’t, click the gray arrow on the upper-right corner of the control or right-click the control and choose Show Smart Tag), check all the available check boxes, shown in Figure 13-4. The links in the left column enable you to edit, delete, and select the relevant genres.
It s fairly common for Web applications to work on a single record at a time.