Profile Picture

Upgraded to most recent version of Nevron, now some but not all data grids have Red X's.

Posted By lars knox 13 Years Ago

Upgraded to most recent version of Nevron, now some but not all data...

Author
Message
lars knox
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 22, Visits: 1
I recently converted a Visual Studio 2008 solution (with the appropriate version of Nevron controls) to a Visual Studio 2010 solution. Part of this upgrade process included renewing our license and getting the newest version of Nevron controls.

Now, most of the application works except for 2 nDataGridViews. In run-time they display as Red X's. In design time, they display the following information:

"The control Nevron.UI.WinForm.NDataGridView has thrown an unhandled exception in the designer and has been disabled.

Exception: Object not set to an instance of an object.

Stack Trace: at Nevron.UI.WinForm.Controls.NDataGridView.OnPaint(PaintEventArgs e)"


The actual control itself displays a full stack trace (picture attached). I have also attached pictures of all of the property settings for the control. All attachments are zipped into a ZIP file and attached. Below is a copy-and-paste of the partial class designer code behind.

Any ideas? Thanks!

Code behind:

namespace WinUI
{
partial class ctlIndices
{
///
/// Required designer variable.
///

private System.ComponentModel.IContainer components = null;

///
/// Clean up any resources being used.
///

/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
try
{
UnsubscribeFromIndices();

components.Dispose();
}
catch { } // Nothing to do since we are closing down
}
base.Dispose(disposing);
}

#region Component Designer generated code

///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ctlIndices));
this.dgvIndices = new Nevron.UI.WinForm.Controls.NDataGridView();
this.pnlConnectionError = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dgvIndices)).BeginInit();
this.pnlConnectionError.SuspendLayout();
this.SuspendLayout();
//
// dgvIndices
//
this.dgvIndices.AllowUserToResizeColumns = false;
this.dgvIndices.AllowUserToResizeRows = false;
this.dgvIndices.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(205)))), ((int)(((byte)(219)))));
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvIndices.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgvIndices.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvIndices.DefaultCellStyle = dataGridViewCellStyle2;
this.dgvIndices.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvIndices.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dgvIndices.EnableCellCustomDraw = false;
this.dgvIndices.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(119)))), ((int)(((byte)(130)))), ((int)(((byte)(153)))));
this.dgvIndices.Location = new System.Drawing.Point(0, 0);
this.dgvIndices.Name = "dgvIndices";
this.dgvIndices.Palette = ((Nevron.UI.WinForm.Controls.NPalette)(resources.GetObject("dgvIndices.Palette")));
this.dgvIndices.PaletteInheritance = ((Nevron.UI.WinForm.Controls.PaletteInheritance)(Nevron.UI.WinForm.Controls.PaletteInheritance.None));
this.dgvIndices.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Sunken;
this.dgvIndices.RowHeadersVisible = false;
this.dgvIndices.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
this.dgvIndices.RowTemplate.DefaultCellStyle.Format = "N2";
this.dgvIndices.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.dgvIndices.Size = new System.Drawing.Size(255, 94);
this.dgvIndices.TabIndex = 6;
this.dgvIndices.SelectionChanged += new System.EventHandler(this.dgvIndices_SelectionChanged);
//
// pnlConnectionError
//
this.pnlConnectionError.Controls.Add(this.label1);
this.pnlConnectionError.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlConnectionError.Location = new System.Drawing.Point(0, 0);
this.pnlConnectionError.Name = "pnlConnectionError";
this.pnlConnectionError.Size = new System.Drawing.Size(255, 94);
this.pnlConnectionError.TabIndex = 7;
//
// label1
//
this.label1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.Red;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(183, 30);
this.label1.TabIndex = 0;
this.label1.Text = "Connecting to Quote Service ...";
//
// ctlIndices
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.dgvIndices);
this.Controls.Add(this.pnlConnectionError);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "ctlIndices";
this.Size = new System.Drawing.Size(255, 94);
this.Load += new System.EventHandler(this.ctlIndices_Load);
this.Resize += new System.EventHandler(this.ctlIndices_Resize);
((System.ComponentModel.ISupportInitialize)(this.dgvIndices)).EndInit();
this.pnlConnectionError.ResumeLayout(false);
this.ResumeLayout(false);

}

#endregion

private Nevron.UI.WinForm.Controls.NDataGridView dgvIndices;
private System.Windows.Forms.Panel pnlConnectionError;
private System.Windows.Forms.Label label1;

}
}


Attachments
Errors.zip (237 views, 268.00 KB)
Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Lars,

Let me first thank you for the provided detailed information regarding the problem.

From the posted code I saw that the value of Palette property is saved in resource.

Since, you upgrade to the newest version the content of this resource may become obsolete.

You can try to remove it from the designer to check whether it cause the problem. If so, you will need to set the palette again.

Please, let us know if the problem persist.



Best Regards,
Nevron Support Team



lars knox
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 22, Visits: 1
Thank you for the advice!

I tried to delete the Palette property in the .resx via the IDE's designer. Unfortunately, I still had the red X. I verified that the Palette data was gone from the .resx code-behind/xml.

Luckily these data grid views are relatively simple... I deleted the entire grid control and then recreated it and things are fine. I just had to make sure the properties and the events were set up correctly again. Thanks again for your advice.



Similar Topics


Reading This Topic