Nov 04, 2011, 4:32 PM
[CLOSED] Namespace Does not register
Hi,
I have an issue with a code. I have a Window in a usercontrol which contains a Grid Panel. However, I am getting a JS error which is related to gridpanel rendering before namespace is registered. Can you look at the following code?
I have an issue with a code. I have a Window in a usercontrol which contains a Grid Panel. However, I am getting a JS error which is related to gridpanel rendering before namespace is registered. Can you look at the following code?
<%@ Control Language="C#" AutoEventWireup="true" %><ext:Window Title="Files" Icon="FolderExplore" Namespace="Forms.Files" ID="me" ItemID="me" ButtonAlign="Center" Width="500" Resizable="false" Height="400" runat="server" Padding="5" Layout="FitLayout" Hidden="false"> <Items> <ext:GridPanel runat="server" Border="false" ClicksToEdit="2" ID="filesGrid" ItemID="filesGrid"> <Store> <ext:Store runat="server" ID="filesGridStore" ItemID="filesGridStore"> <Reader> <ext:JsonReader IDProperty="filename"> <Fields> <ext:RecordField Name="filename" ServerMapping="filename"> </ext:RecordField> <ext:RecordField Name="lastaccess" ServerMapping="lastaccess"> </ext:RecordField> <ext:RecordField Name="createdon" ServerMapping="createdon"> </ext:RecordField> </Fields> </ext:JsonReader> </Reader> </ext:Store> </Store> <ColumnModel> <Columns> <ext:Column Header="File Name" Editable="true" DataIndex="filename"> </ext:Column> <ext:Column Header="Last accessed" Editable="false" DataIndex="lastaccess"> </ext:Column> <ext:Column Header="Created On" DataIndex="createdon"> </ext:Column> <ext:CommandColumn> <Commands> <ext:GridCommand Text="Open" Icon="FolderGo"> </ext:GridCommand> <ext:CommandSeparator /> <ext:GridCommand Text="Delete" Icon="FolderDelete"> </ext:GridCommand> </Commands> </ext:CommandColumn> </Columns> </ColumnModel> <Buttons> <ext:Button runat="server" Text="Create new file" Icon="FolderAdd"> </ext:Button> <ext:Button runat="server" ID="btnUpload" Text="Upload" Icon="FolderUp"> </ext:Button> <ext:Button runat="server" Icon="Cancel" Width="80" ID="btnCancel" Text="Close" ItemID="btnCancel"> </ext:Button> </Buttons> </ext:GridPanel> </Items></ext:Window>
Here's the code for the page where I am trying to use this control.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="GradeWeb.test" %><%@ Register TagPrefix="Form" TagName="Files" Src="~/Forms/Files.ascx" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> </head><body> <form id="form1" runat="server"> <ext:ResourceManager ID="ResourceManager1" runat="server" /> <Form:Files ID="Files1" runat="server" Visible="true"></Form:Files> </form></body>
Having the code for window directly on page also gives the same issue. However, when I remove the namespace, it works on the page. But even if I remove the namespace it does not work in User Control. Can you please check it?
Last edited by Daniil; Nov 07, 2011 at 10:17 AM.
Reason: [CLOSED]