Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
440
Error message shows two times.
posted

Hi.

I have form with 2 controls: WinGrid and UltraCalendarCombo.

WinGrid have editable column  with decimal values.

Scenario:

1. Put incorrect value in cell, for example "hhh".

2. Mouse click  on UltraCalendarCombo.

Problem: Error message shows two times.

Infragistics 10.1.20101.2013

How I can resolve this problem?

Test form:

using System;
using System.Data;
using System.Windows.Forms;
using Infragistics.Win.UltraWinGrid;

namespace Test_Grid
{
public class Form1 : Form
{
private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
private Infragistics.Win.UltraWinSchedule.UltraCalendarCombo ultraCalendarCombo1;

/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
DataColumn dataColumn = new DataColumn("decimal", typeof (decimal)) {Caption = "Decimal"};
dt.Columns.Add(dataColumn);
dt.Rows.Add(1);
dt.Rows.Add(2);
dt.Rows.Add(3);
dt.Rows.Add(4);

ultraGrid1.DataSource = dt;
}

private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
e.Layout.Bands[0].Columns["decimal"].CellClickAction = CellClickAction.Edit;
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinSchedule.CalendarCombo.DateButton dateButton1 = new Infragistics.Win.UltraWinSchedule.CalendarCombo.DateButton();
this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.ultraCalendarCombo1 = new Infragistics.Win.UltraWinSchedule.UltraCalendarCombo();
((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ultraCalendarCombo1)).BeginInit();
this.SuspendLayout();
//
// ultraGrid1
//
appearance4.BackColor = System.Drawing.SystemColors.Window;
appearance4.BorderColor = System.Drawing.SystemColors.InactiveCaption;
this.ultraGrid1.DisplayLayout.Appearance = appearance4;
this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
this.ultraGrid1.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
appearance1.BackColor = System.Drawing.SystemColors.ActiveBorder;
appearance1.BackColor2 = System.Drawing.SystemColors.ControlDark;
appearance1.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
appearance1.BorderColor = System.Drawing.SystemColors.Window;
this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance1;
appearance2.ForeColor = System.Drawing.SystemColors.GrayText;
this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance2;
this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
appearance3.BackColor = System.Drawing.SystemColors.ControlLightLight;
appearance3.BackColor2 = System.Drawing.SystemColors.Control;
appearance3.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
appearance3.ForeColor = System.Drawing.SystemColors.GrayText;
this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance3;
this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
appearance12.BackColor = System.Drawing.SystemColors.Window;
appearance12.ForeColor = System.Drawing.SystemColors.ControlText;
this.ultraGrid1.DisplayLayout.Override.ActiveCellAppearance = appearance12;
appearance7.BackColor = System.Drawing.SystemColors.Highlight;
appearance7.ForeColor = System.Drawing.SystemColors.HighlightText;
this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance = appearance7;
this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted;
this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
appearance6.BackColor = System.Drawing.SystemColors.Window;
this.ultraGrid1.DisplayLayout.Override.CardAreaAppearance = appearance6;
appearance5.BorderColor = System.Drawing.Color.Silver;
appearance5.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance5;
this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
appearance9.BackColor = System.Drawing.SystemColors.Control;
appearance9.BackColor2 = System.Drawing.SystemColors.ControlDark;
appearance9.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
appearance9.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
appearance9.BorderColor = System.Drawing.SystemColors.Window;
this.ultraGrid1.DisplayLayout.Override.GroupByRowAppearance = appearance9;
appearance11.TextHAlignAsString = "Left";
this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance11;
this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.WindowsXPCommand;
appearance10.BackColor = System.Drawing.SystemColors.Window;
appearance10.BorderColor = System.Drawing.Color.Silver;
this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance10;
this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
appearance8.BackColor = System.Drawing.SystemColors.ControlLight;
this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance8;
this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
this.ultraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
this.ultraGrid1.Location = new System.Drawing.Point(12, 56);
this.ultraGrid1.Name = "ultraGrid1";
this.ultraGrid1.Size = new System.Drawing.Size(510, 194);
this.ultraGrid1.TabIndex = 0;
this.ultraGrid1.Text = "ultraGrid1";
this.ultraGrid1.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.ultraGrid1_InitializeLayout);
//
// ultraCalendarCombo1
//
this.ultraCalendarCombo1.DateButtons.Add(dateButton1);
this.ultraCalendarCombo1.Location = new System.Drawing.Point(92, 12);
this.ultraCalendarCombo1.Name = "ultraCalendarCombo1";
this.ultraCalendarCombo1.NonAutoSizeHeight = 0;
this.ultraCalendarCombo1.Size = new System.Drawing.Size(121, 21);
this.ultraCalendarCombo1.TabIndex = 1;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(534, 297);
this.Controls.Add(this.ultraCalendarCombo1);
this.Controls.Add(this.ultraGrid1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ultraCalendarCombo1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
}
}

 

Thanks,

Igor

Parents
  • 469350
    Offline posted

    Hi Igor,

    This looks like a bug in the UltraCalendarCombo. After looking at it very briefly, it looks like perhaps the UltraCalendarCombo is processing the MouseDown message twice. I noticed that the problem does not occur with other controls, like UltraDateTimeEditor.

    I am going to forward this thread over to Infragistics Developer Support so they can check it out.

Reply Children
No Data