Feb 25, 2009, 3:02 AM
InputTextMask using with GridPanel column editor problem
Hi,
I am trying to get working example in codebehind that use InputTextMask from Coolite.Ext.UX in GridPanel column editor
but till this moment without success.
Firebug give me this error message: "Ext.ux.netbox is undefined" and I don't known how to solve this issue.
The problem is in this three lines:
InputTextMask mask = new InputTextMask();
mask.Mask = "99:99:99";
tf.Plugins.Add(mask);
Could you help me please to get the example that I post down below working.
Thanks.
This is CodeBehind file:
I am trying to get working example in codebehind that use InputTextMask from Coolite.Ext.UX in GridPanel column editor
but till this moment without success.
Firebug give me this error message: "Ext.ux.netbox is undefined" and I don't known how to solve this issue.
The problem is in this three lines:
InputTextMask mask = new InputTextMask();
mask.Mask = "99:99:99";
tf.Plugins.Add(mask);
Could you help me please to get the example that I post down below working.
Thanks.
This is CodeBehind file:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Coolite.Ext.Web;
using Coolite.Ext.UX;
public partial class GridWithMask : System.Web.UI.Page
{
public Store Store1;
public GridPanel gp1;
protected void Page_Load(object sender, EventArgs e)
{
Store1 = new Store();
Store1.ID = "Store1";
Store1.DataSource = new object[] {
new object[] { "12:32:12" },
new object[] { "22:43:12" },
new object[] { "43:43:34" }
};
ArrayReader ar = new ArrayReader();
ar.ReaderID = "TestCell";
ar.Fields.Add(new RecordField("TestCell", RecordFieldType.String));
Store1.Reader.Add(ar);
Store1.DataBind();
gp1 = new GridPanel();
gp1.ID = "GridPanel1";
gp1.StoreID = "Store1";
gp1.StripeRows = true;
gp1.ClicksToEdit = 1;
gp1.Title="Test Grid";
gp1.AutoExpandColumn = "TestCell";
gp1.Width=600;
gp1.Height=350;
gp1.ColumnModel.Columns.Add(new RowNumbererColumn());
Column c1 = new Column();
c1.ColumnID = "TestCell";
c1.Header = "TestCell";
c1.DataIndex = "TestCell";
TextField tf = new TextField();
InputTextMask mask = new InputTextMask();
mask.Mask = "99:99:99";
tf.Plugins.Add(mask);
c1.Editor.Add(tf);
gp1.ColumnModel.Columns.Add(c1);
pholder.Controls.Add(Store1);
pholder.Controls.Add(gp1);
}
}
This is a markup file:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridWithMask.aspx.cs" Inherits="GridWithMask" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<%@ Register Assembly="Coolite.Ext.UX" Namespace="Coolite.Ext.UX" TagPrefix="ux" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server">
</ext:ScriptManager>
<asp:PlaceHolder ID="pholder" runat="server"></asp:PlaceHolder>
</form>
</body>
</html>