Hi,
I have a grid in a window form. In the form's constructor, I initialize the grid columns and band header groups based on a predefined xml file. There is no problem in loading. I can resize any column by draging the column header. However, when I try to resize the band header group by draging the group header, it throws out following exception. I have no idea about this exception. Can someone help? Thanks a lot.
************** Exception Text **************System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Win.UltraWinGrid.HeaderUIElement.ApplyAdjustment(Point delta) at Infragistics.Win.AdjustableUIElement.OnMouseUp(MouseEventArgs e) at Infragistics.Win.UltraWinGrid.HeaderUIElement.OnMouseUp(MouseEventArgs e) at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e) at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Do you have the latest Hot Fix? I vaguely recall a bug like this which was fixed a long time ago. What version of the grid are you using?
The call stack here is pretty much all internal to the grid, so I don't see how anything in your application could be causing this - it must be a bug in the grid. If it's not already fixed in the hot fix, then you should Submit an incident to Infragistics Developer Support and include a small sample project demonstrating the error so they can check it out.
I have version 6.3.20063.53 and 7.3.20073.38 both installed on my pc. But I'm using version 7.3.20073.38. I tried to install the hotfix (NetAdvantage_20073_CLR2X_HotFix_WIN_1052), but having error below. Is this caused by the dual versions?
"the upgrade patch cannot be installed by the Windows Installer service because the progreamto be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade path."
I just did a test with the following code on both versions. And surpriseingly It works perfectly well with version 6.3.20063.53.
Sample code:
public partial class Form1 : Form
{
InitializeComponent();
InitGrid();
}
XmlNodeList ndListColDef = xmlDoc.SelectNodes("//Band/Col");
string sColName = ndColDef.Attributes["Name"].Value;
bool bHidden = bool.Parse(ndColDef.Attributes["Hidden"].Value);
mainBand.Groups.Add(sGrpName);
mainBand.Groups[sGrpName].Columns.Add(mainBand.Columns[sColName]);
mainBand.Columns[sColName].Hidden = bHidden;
//sample xml file
<?xml version="1.0" encoding="utf-8" ?><Band Name="Main"> <Col Name="P01" Group="GROUPA" Hidden="true" /> <Col Name="P02" Group="GROUPA" Hidden="true" /> <Col Name="P03" Group="GROUPA" Hidden="false" /> <Col Name="P04" Group="GROUPA" Hidden="false" /> <Col Name="P05" Group="GROUPA" Hidden="false" /> <Col Name="P06" Group="GROUPA" Hidden="false" /> <Col Name="P07" Group="GROUPA" Hidden="false" />
<Col Name="C01" Group="GROUPB" Hidden="false" /> <Col Name="C02" Group="GROUPB" Hidden="false" /> <Col Name="C03" Group="GROUPB" Hidden="false" /> <Col Name="C04" Group="GROUPB" Hidden="false" /> <Col Name="C05" Group="GROUPB" Hidden="false" /> <Col Name="C06" Group="GROUPB" Hidden="false" /> <Col Name="C07" Group="GROUPB" Hidden="true" /> <Col Name="C08" Group="GROUPB" Hidden="true" /> <Col Name="C09" Group="GROUPB" Hidden="true" /> <Col Name="C10" Group="GROUPB" Hidden="true" /> <Col Name="C11" Group="GROUPB" Hidden="true" /> <Col Name="C12" Group="GROUPB" Hidden="true" /></Band>
Sounds to me like you have an old version and your installation is somehow corrupt. I would try uninstalling and re-installing the controls and then apply the Hot Fix.
If that doesn't help, you should contact Infragistics Developer Support and they can help you get it corrected.
Submit an incident to Infragistics Developer Support
Uninstall/re-install doesn't solve this problem. I tried to submit a case but couldn't launch the page http://devcenter.infragistics.com/Protected/SubmitSupportIssue.aspx. Is there any other way I can get to the support group?
The link in my previous post gives you a list of ways in which you can contact support.
Thank you. I got it resolved. End up is because I downloaded the wrong hotfix.