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
1170
Showing Red Cross on UltraGrid with Infragistics 2007 while running Form from new Thread
posted

I am coming across a weird issue. I have attached project samples out of which one is using Infragistics V7.3 while other is using V12.1. I am opening a form from new thread and coming across a red cross while selecting date time column only from column chooser. No other type of column is creating such issue. Moreover, this is not happening with V12.1.

private void ClickMe_Click(object sender, EventArgs e)
{
Thread thread = new Thread(new ThreadStart(LoadPersonInfoOnNewThread));
thread.SetApartmentState(ApartmentState.STA);
thread.IsBackground = true;
thread.Start();

}

private void LoadPersonInfoOnNewThread()
{
try
{
PersonInfo pInfo = new PersonInfo();

DataTable dt = new DataTable();
dt.Columns.Add("FirstName", typeof(string));
dt.Columns.Add("DOB", typeof(DateTime));
dt.Columns.Add("LastName", typeof(string));

DataRow row = dt.NewRow();
row["FirstName"] = "Rahul";
row["LastName"] = "Gupta";
row["DOB"] = DateTime.Now;
dt.Rows.Add(row);

pInfo.grdPersonInfo.DataSource = dt;

Application.Run(pInfo);

}

catch (Exception ex)
{

MessageBox.Show(ex.Message);
}

}

 

NullReferenceException encountered at Infragistics.Win.UltraWinMaskedEdit.MaskInfo.IsMaskModeDefined(MaskMode mode). Please update ASAP as one of very critical clients is facing this issue. 

Note: On clicking the button,we are launching the new form on a differenet thread and all the updates to the gird are done on that thread as I totally understand that any updates to the grid should only be made on the main UI thread. Also in our production code we have launched some of the forms on a diff GUI thread to improve the performance(hangs) which we were earlier seeing. We have tested on WindowsXP, Windows7 and Windows 2008 Server R2.


Steps to reproduce :


1. Click on “Click Me” button on Main Form and it will open a Person Info form.
2. Select/deselect date time column from column chooser.
3. Close the form.
4. Repeat steps 1 and 2.


InfragisticsVersionIssue.rar
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    I tried this out with your sample projects but I am unable to reproduce any exceptions.I don't see a "date time" column here, though. I assume you meant the DOB column?

    I wasn't able to try it with NetAdvantage 2007, though, as I no longer have that version. I tried it with v8.1, which is the oldest version available to me and it worked just fine.

    Version 7 is no longer being updated, anyway, so even if this were a bug in that version, there are no more service releases being released for that version. So if the problem doesn't happen in NetAdvantage 12.2 (the latest version), your solution is to update.