This is a migrated thread and some comments may be shown as answers.

Delete command. No event fired

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jakob
Top achievements
Rank 1
Jakob asked on 02 Aug 2008, 02:20 PM

Hi

Can some one tell me why the delete event isnet fired.

Here is my code.

<%

@ Register assembly="Telerik.Web.UI, Version=2007.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %>

.........

<

telerik:RadGrid ID="RadGrid2" Width="97%" AllowSorting="True" DataSourceID="SqlDataSource1"

AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"

 

AllowPaging="True" GridLines="None" runat="server" ShowFooter="True"

ShowStatusBar="True">

<

ExportSettings>

<

Pdf PaperSize="Letter" FontType="Subset"></Pdf>

<

Excel Format="Html"></Excel>

</

ExportSettings>

 

<MasterTableView Width="100%" GridLines="None" CommandItemDisplay="TopAndBottom" DataSourceID="SqlDataSource1"

 

HorizontalAlign="NotSet" DataKeyNames="UserId" AutoGenerateColumns="false" AllowAutomaticDeletes="true">

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

<Columns>

 

<telerik:GridEditCommandColumn>

 

</telerik:GridEditCommandColumn>

 

<telerik:GridBoundColumn DataField="UserId" UniqueName="CustomerID" HeaderText="Customer ID"></telerik:GridBoundColumn>

 

<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" CommandArgument="Delete">

 

</telerik:GridButtonColumn>

 

</Columns>

 

</MasterTableView>

 

</telerik:RadGrid>

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:MaikenBeckConnectionString %>"

SelectCommand="SELECT [UserName], [LastLoginDate], [Email], [UserId] FROM [vw_aspnet_MembershipUsers] ORDER BY [LastLoginDate] DESC">

 

</asp:SqlDataSource>

and Code behind

protected

void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e)

{

e.ExceptionHandled =

true;

}

BR
Jakob

1 Answer, 1 is accepted

Sort by
0
Jakob
Top achievements
Rank 1
answered on 02 Aug 2008, 02:37 PM
Never mind. My mistake..
Tags
Grid
Asked by
Jakob
Top achievements
Rank 1
Answers by
Jakob
Top achievements
Rank 1
Share this question
or