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
<telerik:RadMenu ID="RadMenu" Runat="server" skin="Web20"
BorderStyle="None" style="top: 0px; left: 0px; width: 970px"
onitemclick="RadMenu_ItemClick" >
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
<Items>
<telerik:RadMenuItem runat="server" Text="Home" Font-Size="Larger"
ImageUrl="img\home.png" ToolTip="Home" NavigateUrl="default.aspx">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Records" Font-Size="Larger"
ImageUrl="img\server_mail.png" ToolTip="Records">
<Items>
<telerik:RadMenuItem runat="server" Text="Search Constituents Records"
ImageUrl="img\businessman_find.png"
NavigateUrl="/pages/SearchConstituentRecords.aspx">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Add Constituents Records"
ImageUrl="img\businessman_add.png"
NavigateUrl="/pages/AddConstituentRecords.aspx">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Update Constituents Records"
ImageUrl="img\businessman_preferences.png"
NavigateUrl="pages/UpdateConstituentRecords.aspx">
</telerik:RadMenuItem>
</Items>
</telerik:RadMenuItem>
.................
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" /> |
| <telerik:RadMenu OnClientLoad="ShowSecondLevel" ClickToOpen="false" |
| ID="RadMenu1" runat="server" |
| DataSourceID="SiteMapDataSource1" |
| Skin="Inox" ExpandAnimation-Type="InCubic"> |
| <ExpandAnimation Duration="20" /> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </telerik:RadMenu> |
| <br /> <br /> <br /> |
| <asp:Menu ID="Menu1" runat="server" BackColor="#F7F6F3" DataSourceID="SiteMapDataSource1" |
| DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#7C6F57" |
| Height="40px" StaticDisplayLevels="3" StaticSubMenuIndent="10px" TabIndex="3"> |
| <StaticSelectedStyle BackColor="#5D7B9D" /> |
| <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> |
| <DynamicHoverStyle BackColor="#7C6F57" ForeColor="White" /> |
| <DynamicMenuStyle BackColor="#F7F6F3" /> |
| <DynamicSelectedStyle BackColor="#5D7B9D" /> |
| <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> |
| <StaticHoverStyle BackColor="#7C6F57" ForeColor="White" /> |
| </asp:Menu> |
Using the techniques described in KB Article "(ID#1059) Setting special days or time slots in RadScheduler" I am able to set the css as described for any cell in any column exept the first one (in a week view ).
While in debug I noticed that it is firing twice for every cell created (eg goes thru Sun Column, then Mon Column etc... then Sun, then Mon etc. again.
As a test I tried the following:
void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
{
e.TimeSlot.CssClass = "disabled";
}
("disabled" CSS had a background of Red )
Expecting all cells to be Red, all were, exept the first column. I see it execute the statement for every cell but does not render the first column.
Any idea of why it goes thru this method twice ? and only the first column is not rendered?
Thanks - Len