Aug 25, 2010, 4:03 PM
[CLOSED] Javascript error when showing window (bug?)
I have a window created programatically with a grid within it, that is shown when user clicks a button. If i click the button, then close the window a few times i start getting this javascript error (it works correctly a few times, but then suddenly i start to get the error and the window is shown, but the grid inside it is not):
"Invalid procedure call or argument" in "h.cssText=i"
Here is how i make the window:
"Invalid procedure call or argument" in "h.cssText=i"
Here is how i make the window:
protected void ShowError()
{
Window WinError = Page.X().Window()
.ID("WinShowErro")
.Title("Mensagem de Erro")
.Height(185)
.Width(500)
.Layout("Fit")
.Modal(true);
WinError.Render(Page.Form);
GridPanel GRPError = Page.X().GridPanel().ID("GRPErro")
.Height(125)
.Width(330)
.AutoExpandColumn("message");
GRPError.SelectionModel.Add(new RowSelectionModel() { SingleSelect = true });
Store storeErro = Page.X().Store().ID("storeErro");
JsonReader drErro = new JsonReader();
drErro.Fields.Add("Tipo", RecordFieldType.String);
drErro.Fields.Add("Codigo", RecordFieldType.String);
drErro.Fields.Add("Message", RecordFieldType.String);
storeErro.Reader.Add(drErro);
GRPError.Store.Add(storeErro);
RM.RegisterIcon(Icon.Decline);
RM.RegisterIcon(Icon.Error);
RM.RegisterIcon(Icon.Information);
Column col;
col = new Column();
col.Header = "Tipo";
col.DataIndex = "Tipo";
col.MenuDisabled = true;
col.RightCommandAlign = false;
ImageCommand ICErro = new ImageCommand();
ICErro.Hidden = true;
ICErro.CommandName = "Erro";
ICErro.Icon = Icon.Decline;
col.Commands.Add(ICErro);
ImageCommand ICWarning = new ImageCommand();
ICWarning.Hidden = true;
ICWarning.CommandName = "Warning";
ICWarning.Icon = Icon.Error;
col.Commands.Add(ICWarning);
ImageCommand ICMessage = new ImageCommand();
ICMessage.Hidden = true;
ICMessage.CommandName = "Message";
ICMessage.Icon = Icon.Information;
col.Commands.Add(ICMessage);
col.PrepareCommand.Fn = "SetIcon";
GRPError.ColumnModel.Columns.Add(col);
col = new Column();
col.Header = "Código";
col.DataIndex = "Codigo";
col.MenuDisabled=true;
GRPError.ColumnModel.Columns.Add(col);
col = new Column();
col.Header = "Descrição";
col.DataIndex = "Message";
col.ColumnID = "message";
col.MenuDisabled=true;
GRPError.ColumnModel.Columns.Add(col);
storeErro.DataSource = ErrorList;
storeErro.DataBind();
GRPError.Render("WinShowErro", RenderMode.AddTo);
}
Last edited by geoffrey.mcgill; Aug 25, 2010 at 6:42 PM.
Reason: [CLOSED]