System.NullReferenceException in System.Core.dll 在 MainWindo



我在C#中有一个简单的窗口,里面有一些元素。当我尝试运行它时,我得到一个"System.NullReferenceException in System.Core.dll"。在调试中,异常在主窗口构造函数的末尾引发(括号位于(

public MainWindow()
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE");
InitializeComponent();
user = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
handler = new DataHandlerPlants();
tbTransponder.Focus();
loadgrid(); //gets grid-Items from DB
loadComboboxes(); //gets combobox-Items from DB
} //Here is where the exception is raised

可能是什么原因造成的?

刚刚意识到问题:

我向 GridView 添加了分组,但应作为分组依据的列不可用。

相关内容

最新更新