Hi,
I have a GridViewCommandColumn in my grid. I populate the grid, sort on the command column. Then in some operation I update the values of the GridViewCommandColumn. Upon clicking any cell of this column, I get the following exception
Message : {"Expecting 1 value(s) for the key being indexed, but received 0 value(s)."}
Stack : at System.Data.Index.FindNodeByKeys(Object[] originalKey)
at System.Data.Index.FindRecordByKey(Object[] key)
at System.Data.DataView.FindByKey(Object[] key)
at System.Data.DataView.Find(Object[] key)
at Telerik.WinControls.Data.DataAccessComponent.FindRow(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridViewInfo.GetVisibleRowIndex(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridCellElement.get_RowIndex()
at Telerik.WinControls.UI.GridViewCellEventArgs..ctor(GridCellElement GridViewCell)
at Telerik.WinControls.UI.GridCommandCellElement.OnClick(EventArgs e)
at Telerik.WinControls.UI.GridCommandCellElement.button_Click(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonItem.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.RadElement.CallDoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.RadGridView.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 Microsoft.AdCenter.CommunityPlatform.UI.Desktop.Program.Main() in c:\Enlistments\CommunityPlatform\Dev\private\src\UI\Desktop\Program.cs:line 19
Please suggest what can be wrong here.
Thanks
Ankur
I have a GridViewCommandColumn in my grid. I populate the grid, sort on the command column. Then in some operation I update the values of the GridViewCommandColumn. Upon clicking any cell of this column, I get the following exception
Message : {"Expecting 1 value(s) for the key being indexed, but received 0 value(s)."}
Stack : at System.Data.Index.FindNodeByKeys(Object[] originalKey)
at System.Data.Index.FindRecordByKey(Object[] key)
at System.Data.DataView.FindByKey(Object[] key)
at System.Data.DataView.Find(Object[] key)
at Telerik.WinControls.Data.DataAccessComponent.FindRow(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridViewInfo.GetVisibleRowIndex(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridCellElement.get_RowIndex()
at Telerik.WinControls.UI.GridViewCellEventArgs..ctor(GridCellElement GridViewCell)
at Telerik.WinControls.UI.GridCommandCellElement.OnClick(EventArgs e)
at Telerik.WinControls.UI.GridCommandCellElement.button_Click(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonItem.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.RadElement.CallDoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.RadGridView.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 Microsoft.AdCenter.CommunityPlatform.UI.Desktop.Program.Main() in c:\Enlistments\CommunityPlatform\Dev\private\src\UI\Desktop\Program.cs:line 19
Please suggest what can be wrong here.
Thanks
Ankur