You can do so by simply adding the ShowDeleteButton property to
the
tag as shown in the following line:
Without any additional code, this single property adds the ability to easily delete
tasks from the grid as you??™ll see a bit later.
After the tag, you??™ll notice an , which
is used to associate the SelectedIndexChanged event of the main DropDownList with the
UpdatePanel as shown here:
"SelectedIndexChanged"/>
The second UpdatePanel in the page is for inserting a new task and contains a
DetailsView control as opposed to a GridView inside the tag.
CHAPTER 6 ?– USING SERVER CONTROLS IN ASP.NET AJAX 120
AutoGenerateRows="False"
DataKeyNames="TaskId"
DataSourceID="ObjectDataSource1"
DefaultMode="Insert"
CssClass="detailsview"
GridLines="None">
"False" ReadOnly="True"
SortExpression="TaskId" />
/>
SortExpression="Complete" />
If you noticed, the UpdateMode property of this UpdatePanel control is set to
Conditional, meaning that it relies on external source to instigate an actual updated
rendering such as a tag, which was defined in the previous UpdatePanel
control.
Pages:
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197