hi, i am trying q3 sp1.
i have function:
public void UpdateData()
{
this.CategoryView.AllowAddNewRow = false;
this.CategoryView.TableElement.RowHeight = 40;
this.CategoryView.ReadOnly = true;
this.CategoryView.TableElement.RowSpacing = 2;
this.CategoryView.TableElement.ShowSelfReferenceLines = true;
this.CategoryView.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.FullRowSelect;
this.CategoryView.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
DataTable source = CreateDataSource(); // this function work correct
if (this.CategoryView.DataSource != null)
{
string s = this.CategoryView.DataSource.ToString(); // s has a value
}
this.CategoryView.DataSource = source; ///!!!!!!!!!!!!!!!!!!!!here i have problem "Object reference not set to an instance of an object."
this.CategoryView.MasterTemplate.SortDescriptors.Add("lastupdate", ListSortDirection.Descending);
this.CategoryView.Relations.AddSelfReference(this.CategoryView.MasterTemplate, "id", "parent_id");
this.CategoryView.Columns["id"].IsVisible = false;
this.CategoryView.Columns["sn"].IsVisible = false;
this.CategoryView.Columns["parent_id"].IsVisible = false;
this.CategoryView.Columns["is_comment"].IsVisible = false;
this.CategoryView.Columns["fulltext"].IsVisible = false;
this.CategoryView.Columns["pubdate"].IsVisible = false;
this.CategoryView.Columns["source"].IsVisible = false;
this.CategoryView.Columns["category"].IsVisible = false;
this.CategoryView.Columns["lastupdate"].IsVisible = false;
this.CategoryView.Columns["title"].WrapText = true;
}
the problem start from the second call of function, first call work fine:
System.NullReferenceException не обработано пользовательским кодом
Message="Object reference not set to an instance of an object."
Source="Telerik.WinControls.GridView"
StackTrace:
at Telerik.WinControls.UI.GridViewCellInfoCollection.get_Item(String name)
at Telerik.WinControls.UI.GridDataCellElement.UpdateInfoCore()
at Telerik.WinControls.UI.GridCellElement.UpdateInfo()
at Telerik.WinControls.UI.GridTableElement.UpdateCellContentByColumn(GridViewColumn column)
at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
at Telerik.WinControls.UI.GridViewSelfReferenceDataProvider.DispatchDataViewChangedEvent(DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridViewSelfReferenceDataProvider.Refresh()
at Telerik.WinControls.UI.GridViewTemplate.Telerik.WinControls.Data.IDataItemSource.Initialize()
at Telerik.WinControls.Data.RadListSource`1.Initialize()
at Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
at Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
at Telerik.WinControls.UI.GridViewTemplate.set_DataSource(Object value)
at Telerik.WinControls.UI.RadGridView.set_DataSource(Object value)
at AgroCenterCommunity.LawsForm.UpdateData() in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 246
at AgroCenterCommunity.LawsForm.LawsForm_Load(Object sender, EventArgs e) in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 221
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
InnerException:
"string s" return a value, but then on next line VS2008 tell, that "Object reference not set to an instance of an object."
Need help.
insert
CategoryView.MasterTemplate.Reset(); before DataTable source = CreateDataSource();
and have this:
System.Reflection.TargetInvocationException не обработано
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Telerik.WinControls.UI.GridRowElement.CreateCell(GridViewColumn column)
at Telerik.WinControls.UI.GridDataRowElement.CreateCell(GridViewColumn column)
at Telerik.WinControls.UI.CellElementProvider.CreateElement(GridViewColumn data, Object context)
at Telerik.WinControls.UI.CellElementProvider.GetElement(GridViewColumn data, Object context)
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.UpdateElement(Int32 position, T data)
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureElements()
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.GridVirtualizedRowElement.MeasureElements(SizeF availableSize, SizeF clientSize, Padding borderThickness)
at Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.UI.GridRowElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.VirtualizedStackContainer`1.MeasureElementCore(RadElement element, SizeF availableSize)
at Telerik.WinControls.UI.ScrollableRowsContainerElement.MeasureElementCore(RadElement element, SizeF availableSize)
at Telerik.WinControls.UI.VirtualizedStackContainer`1.MeasureElement(IVirtualizedElement`1 element)
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureElements()
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.UI.ScrollableRowsContainerElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.RowsContainerElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.ScrollViewElement`1.MeasureViewElement(SizeF availableSize)
at Telerik.WinControls.UI.ScrollViewElement`1.MeasureView(SizeF availableSize)
at Telerik.WinControls.UI.ScrollViewElement`1.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.UI.GridTableElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.Layouts.DockLayoutPanel.MeasureOverride(SizeF constraint)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
at Telerik.WinControls.RadElement.UpdateLayout()
at Telerik.WinControls.UI.GridVisibilityHelper.EnsureRowVisible(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridTableElement.EnsureRowVisible(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridTableElement.EnsureCellVisible(GridViewRowInfo rowInfo, GridViewColumn column)
at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.RaiseCurrentChanged(GridViewTemplate template, GridViewRowInfo row, GridViewColumn column, Boolean user)
at Telerik.WinControls.UI.GridViewTemplate.CollectionView_CurrentChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Telerik.WinControls.Data.RadCollectionView`1.OnCurrentChanged(EventArgs args)
at Telerik.WinControls.Data.RadCollectionView`1.SetCurrentPositionCore(Int32 newPosition, Boolean forceNotify, CurrentChangeReason reason)
at Telerik.WinControls.Data.RadListSource`1.InitializeCurrentItem()
at Telerik.WinControls.Data.RadListSource`1.Initialize()
at Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
at Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
at Telerik.WinControls.UI.GridViewTemplate.set_DataSource(Object value)
at Telerik.WinControls.UI.RadGridView.set_DataSource(Object value)
at AgroCenterCommunity.LawsForm.UpdateData() in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 245
at AgroCenterCommunity.LawsForm.UpdateButton_Click(Object sender, EventArgs e) in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 676
at System.Windows.Forms.Control.OnClick(EventArgs e)
at Telerik.WinControls.RadControl.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonBase.buttonElement_Click(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonElement.OnClick(EventArgs e)
at Telerik.WinControls.RadItem.DoClick(EventArgs e)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.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.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AgroCenterCommunity.Program.SplashScreen() in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\Program.cs:line 41
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.NullReferenceException
Message="Object reference not set to an instance of an object."
Source="AgroCenterCommunity"
StackTrace:
at AgroCenterCommunity.LawsForm.CategoryView_ViewCellFormatting(Object sender, CellFormattingEventArgs e) in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 360
at Telerik.WinControls.UI.CellFormattingEventHandler.Invoke(Object sender, CellFormattingEventArgs e)
at Telerik.WinControls.UI.RadGridViewElement.OnViewCellFormatting(Object sender, CellFormattingEventArgs e)
at Telerik.WinControls.UI.GridDataCellElement.OnViewCellFormatting(CellFormattingEventArgs e)
at Telerik.WinControls.UI.GridCellElement.UpdateInfo()
at Telerik.WinControls.UI.GridVirtualizedCellElement.Initialize(GridViewColumn column, GridRowElement row)
at Telerik.WinControls.UI.GridDataCellElement..ctor(GridViewColumn column, GridRowElement row)
InnerException:
i have function:
public void UpdateData()
{
this.CategoryView.AllowAddNewRow = false;
this.CategoryView.TableElement.RowHeight = 40;
this.CategoryView.ReadOnly = true;
this.CategoryView.TableElement.RowSpacing = 2;
this.CategoryView.TableElement.ShowSelfReferenceLines = true;
this.CategoryView.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.FullRowSelect;
this.CategoryView.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
DataTable source = CreateDataSource(); // this function work correct
if (this.CategoryView.DataSource != null)
{
string s = this.CategoryView.DataSource.ToString(); // s has a value
}
this.CategoryView.DataSource = source; ///!!!!!!!!!!!!!!!!!!!!here i have problem "Object reference not set to an instance of an object."
this.CategoryView.MasterTemplate.SortDescriptors.Add("lastupdate", ListSortDirection.Descending);
this.CategoryView.Relations.AddSelfReference(this.CategoryView.MasterTemplate, "id", "parent_id");
this.CategoryView.Columns["id"].IsVisible = false;
this.CategoryView.Columns["sn"].IsVisible = false;
this.CategoryView.Columns["parent_id"].IsVisible = false;
this.CategoryView.Columns["is_comment"].IsVisible = false;
this.CategoryView.Columns["fulltext"].IsVisible = false;
this.CategoryView.Columns["pubdate"].IsVisible = false;
this.CategoryView.Columns["source"].IsVisible = false;
this.CategoryView.Columns["category"].IsVisible = false;
this.CategoryView.Columns["lastupdate"].IsVisible = false;
this.CategoryView.Columns["title"].WrapText = true;
}
the problem start from the second call of function, first call work fine:
System.NullReferenceException не обработано пользовательским кодом
Message="Object reference not set to an instance of an object."
Source="Telerik.WinControls.GridView"
StackTrace:
at Telerik.WinControls.UI.GridViewCellInfoCollection.get_Item(String name)
at Telerik.WinControls.UI.GridDataCellElement.UpdateInfoCore()
at Telerik.WinControls.UI.GridCellElement.UpdateInfo()
at Telerik.WinControls.UI.GridTableElement.UpdateCellContentByColumn(GridViewColumn column)
at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
at Telerik.WinControls.UI.GridViewSelfReferenceDataProvider.DispatchDataViewChangedEvent(DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridViewSelfReferenceDataProvider.Refresh()
at Telerik.WinControls.UI.GridViewTemplate.Telerik.WinControls.Data.IDataItemSource.Initialize()
at Telerik.WinControls.Data.RadListSource`1.Initialize()
at Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
at Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
at Telerik.WinControls.UI.GridViewTemplate.set_DataSource(Object value)
at Telerik.WinControls.UI.RadGridView.set_DataSource(Object value)
at AgroCenterCommunity.LawsForm.UpdateData() in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 246
at AgroCenterCommunity.LawsForm.LawsForm_Load(Object sender, EventArgs e) in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 221
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
InnerException:
"string s" return a value, but then on next line VS2008 tell, that "Object reference not set to an instance of an object."
Need help.
insert
CategoryView.MasterTemplate.Reset(); before DataTable source = CreateDataSource();
and have this:
System.Reflection.TargetInvocationException не обработано
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Telerik.WinControls.UI.GridRowElement.CreateCell(GridViewColumn column)
at Telerik.WinControls.UI.GridDataRowElement.CreateCell(GridViewColumn column)
at Telerik.WinControls.UI.CellElementProvider.CreateElement(GridViewColumn data, Object context)
at Telerik.WinControls.UI.CellElementProvider.GetElement(GridViewColumn data, Object context)
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.UpdateElement(Int32 position, T data)
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureElements()
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.GridVirtualizedRowElement.MeasureElements(SizeF availableSize, SizeF clientSize, Padding borderThickness)
at Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.UI.GridRowElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.VirtualizedStackContainer`1.MeasureElementCore(RadElement element, SizeF availableSize)
at Telerik.WinControls.UI.ScrollableRowsContainerElement.MeasureElementCore(RadElement element, SizeF availableSize)
at Telerik.WinControls.UI.VirtualizedStackContainer`1.MeasureElement(IVirtualizedElement`1 element)
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureElements()
at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.UI.ScrollableRowsContainerElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.RowsContainerElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.ScrollViewElement`1.MeasureViewElement(SizeF availableSize)
at Telerik.WinControls.UI.ScrollViewElement`1.MeasureView(SizeF availableSize)
at Telerik.WinControls.UI.ScrollViewElement`1.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.UI.GridTableElement.MeasureOverride(SizeF availableSize)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.Layouts.DockLayoutPanel.MeasureOverride(SizeF constraint)
at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
at Telerik.WinControls.RadElement.UpdateLayout()
at Telerik.WinControls.UI.GridVisibilityHelper.EnsureRowVisible(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridTableElement.EnsureRowVisible(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridTableElement.EnsureCellVisible(GridViewRowInfo rowInfo, GridViewColumn column)
at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.RaiseCurrentChanged(GridViewTemplate template, GridViewRowInfo row, GridViewColumn column, Boolean user)
at Telerik.WinControls.UI.GridViewTemplate.CollectionView_CurrentChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Telerik.WinControls.Data.RadCollectionView`1.OnCurrentChanged(EventArgs args)
at Telerik.WinControls.Data.RadCollectionView`1.SetCurrentPositionCore(Int32 newPosition, Boolean forceNotify, CurrentChangeReason reason)
at Telerik.WinControls.Data.RadListSource`1.InitializeCurrentItem()
at Telerik.WinControls.Data.RadListSource`1.Initialize()
at Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
at Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
at Telerik.WinControls.UI.GridViewTemplate.set_DataSource(Object value)
at Telerik.WinControls.UI.RadGridView.set_DataSource(Object value)
at AgroCenterCommunity.LawsForm.UpdateData() in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 245
at AgroCenterCommunity.LawsForm.UpdateButton_Click(Object sender, EventArgs e) in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 676
at System.Windows.Forms.Control.OnClick(EventArgs e)
at Telerik.WinControls.RadControl.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonBase.buttonElement_Click(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonElement.OnClick(EventArgs e)
at Telerik.WinControls.RadItem.DoClick(EventArgs e)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.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.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AgroCenterCommunity.Program.SplashScreen() in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\Program.cs:line 41
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.NullReferenceException
Message="Object reference not set to an instance of an object."
Source="AgroCenterCommunity"
StackTrace:
at AgroCenterCommunity.LawsForm.CategoryView_ViewCellFormatting(Object sender, CellFormattingEventArgs e) in C:\Documents and Settings\mxL\My Documents\Visual Studio 2008\Projects\ACK_01\ACK_01\LawsForm.cs:line 360
at Telerik.WinControls.UI.CellFormattingEventHandler.Invoke(Object sender, CellFormattingEventArgs e)
at Telerik.WinControls.UI.RadGridViewElement.OnViewCellFormatting(Object sender, CellFormattingEventArgs e)
at Telerik.WinControls.UI.GridDataCellElement.OnViewCellFormatting(CellFormattingEventArgs e)
at Telerik.WinControls.UI.GridCellElement.UpdateInfo()
at Telerik.WinControls.UI.GridVirtualizedCellElement.Initialize(GridViewColumn column, GridRowElement row)
at Telerik.WinControls.UI.GridDataCellElement..ctor(GridViewColumn column, GridRowElement row)
InnerException: