Hi there,
I encountered an interesting error that blocks all user input to the application, and have created a small sample project to demonstrate it.
The error loop occurs when invalid data is entered into a cell (e.g. "three" in a cell expecting an integer), and (while the cell is still active) the MDI child form containing the grid control is closed.
The UltraGrid (to exhibit the full bad behaviour) needs to be contained within another control which itself is contained within an MDI child form.
The MDI Parent form needs to have at least two child forms, or the error box will only fire two or three times, rather than in a loop.
Here some code that demonstrates the problem.
using System; using System.Data; using System.Windows.Forms; using Infragistics.Win.UltraWinGrid; public class ContainerForm : Form { [STAThread] static void Main() { Application.SetCompatibleTextRenderingDefault(false); Application.Run(new ContainerForm()); } public ContainerForm() { this.InitializeComponent(); } private void InitializeComponent() { this.SuspendLayout(); // // ContainerForm // this.ClientSize = new System.Drawing.Size(284, 262); this.IsMdiContainer = true; this.Name = "ContainerForm"; this.Text = "Type some non-numeric text into the integer-only cells in the grid, then close the form"; this.Shown += new System.EventHandler(this.ContainerForm_Shown); this.ResumeLayout(false); } private void ContainerForm_Shown(object sender, EventArgs e) { ChildForm form1 = new ChildForm(); form1.MdiParent = this; form1.Show(); ChildForm form2 = new ChildForm(); form2.MdiParent = this; form2.Show(); } } public class ChildForm : Form { private IntegerGridContainer gridControl; private DataTable dataSource; public ChildForm() { this.gridControl = new IntegerGridContainer(); this.Controls.Add(this.gridControl); // Set up grid with an integer only column. dataSource = new DataTable("TableName"); dataSource.Columns.Add("Integer", typeof(int)); this.gridControl.DataSource = dataSource; } } public class IntegerGridContainer : UltraGrid { public IntegerGridContainer() { // Create UltraGrid this.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.TemplateOnBottom; this.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText; } }
I would welcome any suggestions, particularly if the fix does not alter the grid's behaviour the rest of the time. On a related note, is it possible to disable or alter the appearance of the message box that appears when there are Data Errors "Unable to update the data value..." or when the user is deleting a row, etc?Many Thanks,Tom
Hello Tom,
I noticed that you mentioned that you had created a sample project to demonstrate the issue. Would you be able to attach that project to this thread? You can attach a file to a post by selecting the Options tab when you're editing the post.
I'm terribly sorry. It's been two years since I posted about the error, and I've long since misplaced the project file.But I did post code in the original post that fully replicates the problem. If you have tried this code and cannot replicate the problem, I'd suggest maybe its been fixed by a prior release.
Hello,
I created a sample using NetAdvantage 2011 Volume 1, and I did not reproduce the issue. The error dialog only showed twice. Please let me know which version of NetAdvantage you were using.
Ok, I thought you might have caught some subtext in my previous reply.
I admire your attempts to get additional reproduction information two years after the bug was first reported, however a number of things have changed since then. For example, the .net framework itself has been updated a number of times. As have your libraries.
Regardless, my team no longer use the Infragistics controls suite, as we found it to be buggy and bloated.
A prompter and more helpful response to many of the issues posted in the forums (not by me, but regarding issues that my team and I had an interest in) may perhaps have prolonged the use of the controls, but in the end the outcome would have been the same due to the poorly thought out and poorly documented methods, properties, classes and namespaces.
Please do not contact me again about this issue.
Thanks for clarifying things. You are right, since I cannot reproduce it in 11.1, this was probably addressed in the latest version.We have made an improvement to forums so that in addition to answering customers with registered keys faster, we are also going back and answering those posts that had not yet been answered. This is just in case you or anyone else in the community still needs the answer.I think we are safe to say that the latest version solved this issue and now you are now aware of the improvements to support.You can choose to opt out of updates on your user profile in case anyone else in the community posts to this thread so you will not be updated moving forward.Just go to >>Edit your profile >>Site Options >>and set Enable Conversation and Comment Notifications = “No”.Thank you for your time.
Hi Renuk,
Can you duplicate the problem in a small sample project and post it here so we can check it out?
The only similar problem I am aware of it a bug in the ContainerControl implementation in the DotNet Framework. I've seen cases where if you have a grid inside a ContainerControl nested inside another ContainerControl and you show a MessageBox, the framework gets stuck in a loop. The only way around that is to not use ContainerControl-derived containers, though.
i have a similar problem. Using Infragisitcs 13.1. Please advise.
Well done for a graceful and measured response to a frustrated and atagonistic post.
That's actually some good customer service there.