ProviderName="System.Data.SqlClient"
ConnectionString="<%$ ConnectionStrings:AdventureWorks %>"
SelectCommand="Select DepartmentID, Name, GroupName, ModifiedDate from HumanResources.Department"
DeleteCommand="Delete from HumanResources.Department Where DepartmentID=@original_DepartmentID"
OldValuesParameterFormatString="original_{0}" OnDeleted="deptSource_Deleted">
AutoGenerateColumns="False"
runat="server"
DataSourceID="deptSource"
HeaderStyle-HorizontalAlign="Center"
HeaderStyle-Font-Bold="True"
HeaderStyle-BackColor="blue"
HeaderStyle-ForeColor="White"
DataKeyNames="DepartmentID">
OnClientClick="return confirm('Are you sure you want to delete this record?');"
CommandName="Delete" />