I'm pretty new to Telerik, and I've researched this problem for a few days and none of the solutions I've found have worked for me.
I'm using DotNetNuke 4.8.0, VS2008 (9.0.2.21022.8 RTM). Tested in FF 2.0.0.11 and IE 7.0.6000. This is running on my local Vista Ultimate machine with IIS 7.0.6000. I am using .netTiers as my DAL.
I'm using the trial version - ASP.NET Q3 2007 SP1 (Version Number 2007.3.1314
What my problem is - When I click Update or Cancel, it doesn't close the edit form. The page does a postback, but the edit form is still open. I don't notice any Events firing that are firing as a result of the Cancel button, just those of a page reloading.
If I don't use a custom edit form, the default Cancel operates normally.
Any pointers would be great, I assume I'm missing something simple; I just can't see it.
Both the Edit Control and the Control with the Grid on it are posted in full below.
Thanks
My ascx with the Grid control is
My UserControl edit ascx is
The only thing I have in the code is some simple DataBinding in PageLoad
I'm using DotNetNuke 4.8.0, VS2008 (9.0.2.21022.8 RTM). Tested in FF 2.0.0.11 and IE 7.0.6000. This is running on my local Vista Ultimate machine with IIS 7.0.6000. I am using .netTiers as my DAL.
I'm using the trial version - ASP.NET Q3 2007 SP1 (Version Number 2007.3.1314
What my problem is - When I click Update or Cancel, it doesn't close the edit form. The page does a postback, but the edit form is still open. I don't notice any Events firing that are firing as a result of the Cancel button, just those of a page reloading.
If I don't use a custom edit form, the default Cancel operates normally.
Any pointers would be great, I assume I'm missing something simple; I just can't see it.
Both the Edit Control and the Control with the Grid on it are posted in full below.
Thanks
My ascx with the Grid control is
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="ViewTestModule.ascx.cs" Inherits="GS_Marketplace.DotNetNuke.Modules.TestModule.ViewTestModule" %> |
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
<asp:Label ID="lblDebug" runat="server">Vroom?</asp:Label> |
<telerik:RadGrid Skin="WebBlue" ID="RadGrid1" runat="server" |
GridLines="None" AllowPaging="True" AllowSorting="True" |
Width="97%" AutoGenerateColumns="False" ShowStatusBar="True" |
OnNeedDataSource="RadGrid1_NeedDataSource" |
OnUpdateCommand="RadGrid1_UpdateCommand" |
OnInsertCommand="RadGrid1_InsertCommand" |
OnDeleteCommand="RadGrid1_DeleteCommand" |
oncancelcommand="RadGrid1_CancelCommand"> |
<MasterTableView EnableViewState="True" EnableColumnsViewState="True" CurrentResetPageIndexAction="SetPageIndexToFirst" DataKeyNames="GenderTypeID" |
Frame="Border" TableLayout="Auto" CommandItemDisplay="Top"> |
<RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False"> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
<ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False" Resizable="False"> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn> |
<telerik:GridBoundColumn UniqueName="GenderTypeID" HeaderText="ID" DataField="GenderTypeID"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn UniqueName="Description" HeaderText="Description" DataField="Description"></telerik:GridBoundColumn> |
<telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" /> |
</Columns> |
<EditFormSettings UserControlName="~/DesktopModules/Goldstar Consulting.TestModule/TestAddControl.ascx" EditFormType="WebUserControl"> |
<EditColumn UniqueName="EditCommandColumn1"></EditColumn> |
</EditFormSettings> |
</MasterTableView> |
</telerik:RadGrid> |
My UserControl edit ascx is
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="TestAddControl.ascx.cs" Inherits="GS_Marketplace.DotNetNuke.Modules.TestModule.TestAddControl" %> |
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
<asp:Label ID="lblDebug" runat="server"></asp:Label> |
<div> |
<telerik:RadTextBox EnableViewState="True" ID="RadTextBox1" Runat="server" |
EmptyMessage="New Gender Type" Label="Gender" Text='<%# DataBinder.Eval(Container, "DataItem.Description") %>' |
TextMode="SingleLine" Height="20px" Width="237px"> |
</telerik:RadTextBox> |
</div> |
<div align="right"> |
<asp:button EnableViewState="True" id="btnUpdate" text="Update" runat="server" CommandName="Update" Visible='<%# !(Container is Telerik.Web.UI.GridInsertionObject) %>'></asp:button> |
<asp:button EnableViewState="True" id="btnInsert" text="Insert" runat="server" CommandName="PerformInsert" Visible='<%# Container is Telerik.Web.UI.GridInsertionObject %>'></asp:button> |
|
<asp:button EnableViewState="True" id="btnCancel" text="Cancel" runat="server" causesvalidation="False" commandname="Cancel"></asp:button> |
</div> |
protected void Page_Load(object sender, EventArgs e) |
{ |
try |
{ |
if (!IsPostBack) |
{ |
} |
GenderTypeService genderTypeService = new GenderTypeService(); |
int totalCount = 0; |
TList<GenderType> genderTypeList = genderTypeService.GetPaged(GenderTypeColumn.Deleted + " = 'false'", GenderTypeColumn.GenderTypeId.ToString(), 0, 10, out totalCount); |
RadGrid1.DataSource = genderTypeList.ToDataSet(false); |
RadGrid1.DataBind(); |
} |
catch (Exception ex) |
{ |
Exceptions.ProcessModuleLoadException(this, ex); |
} |
} |