选择空行的某个单元格,然后单击以进行编辑时会出现问题:程序崩溃。VisualStudio中会出现一个消息框,上面说:“当前位置没有可用的源代码。”我想知道如何使数据网格中的单元格可编辑?
System.InvalidOperationException为
允许此视图。”
Source=“PresentationFramework”
(项目)
在Microsoft.Windows.Controls.DataGrid.EditRowItem(对象
3396
在Microsoft.Windows.Controls.DataGrid.OnExecutedBeginEdit(ExecutedRoutedEventArgs
e) 在
2208
在Microsoft.Windows.Controls.DataGrid.OnExecutedBeginEdit(对象
发件人,已在中执行RoutedEventTargets e)
C:\dd\WPF\u 1\src\WPF\src\ControlsPack\WPFToolkit\DataGrid\Microsoft\Windows\Controls\DataGrid.cs:line
2036
位于System.Windows.Input.CommandBinding.Onexed(对象
发送方,已执行路由目标(e)
发送方,已执行路由目标e,
命令绑定(CommandBinding)
命令绑定、对象发送器、,
路由目标e,ICommand命令,
布尔值(执行)
位于System.Windows.Input.CommandManager.FindCommandBinding(对象
发送方,路由目标e,ICommand
命令,布尔值执行)
在System.Windows.Input.CommandManager.OnExecuted(对象
发送方,已执行路由目标(e)
在System.Windows.UIElement.onexecutedtunk(对象
发送方,已执行路由目标(e)
在System.Windows.Input.ExecutedEventTargets.InvokeeEventHandler(委托
通用处理程序(对象目标)
在System.Windows.RoutedEventArgs.InvokeHandler(委托
处理程序(对象目标)
在System.Windows.RoutedEventHandlerInfo.InvokeHandler(对象
目标,路线目标
路线(目标)
在System.Windows.EventRoute.InvokeHandlerSimp(对象
源,RoutedEventArgs参数,布尔值
(重播)
位于System.Windows.UIElement.RaiseEventImpl(DependencyObject
发送方,RoutedEventArgs(参数)
在System.Windows.UIElement.RaiseEvent处(RoutedEventArgs
args,布尔值(可信)
在System.Windows.Input.RoutedCommand.ExecuteImpl(对象
参数,IInputElement目标,
布尔值(已启动)
在System.Windows.Input.RoutedCommand.Execute(对象
参数,IInputElement(目标)
在中编辑EventArgs)
C:\dd\WPF\u 1\src\WPF\src\ControlsPack\WPFToolkit\DataGrid\Microsoft\Windows\Controls\DataGrid.cs:line
3059
e) 在
C:\dd\WPF\u 1\src\WPF\src\ControlsPack\WPFToolkit\DataGrid\Microsoft\Windows\Controls\DataGridCell.cs:line
在Microsoft.Windows.Controls.DataGridCell.OnAnyMouseLeftButtonDownThunk(对象
发送器,鼠标按钮输入
726
在System.Windows.Input.MouseButtonEventArgs.InvokeeEventHandler(委托
genericHandler,对象genericTarget)
在System.Windows.RoutedEventArgs.InvokeHandler(委托
处理程序(对象目标)
在System.Windows.RoutedEventHandlerInfo.InvokeHandler(对象
在System.Windows.EventRoute.InvokeHandlerSimp(对象
源,RoutedEventArgs参数,布尔值
(重播)
在System.Windows.UIElement.ReRaiseEventAs(DependencyObject
发送方,RoutedEventArgs,
发送器,鼠标按钮(Ventargs e)
位于System.Windows.UIElement.OnMouseDownThunk(对象
发送器,鼠标按钮(Ventargs e)
在System.Windows.RoutedEventArgs.InvokeHandler(委托
处理程序(对象目标)
在System.Windows.RoutedEventHandlerInfo.InvokeHandler(对象
路线(目标)
在System.Windows.EventRoute.InvokeHandlerSimp(对象
源,RoutedEventArgs参数,布尔值
(重播)
位于System.Windows.UIElement.RaiseEventImpl(DependencyObject
在System.Windows.UIElement.RaiseEvent处(RoutedEventArgs
args,布尔值(可信)
在System.Windows.Input.InputManager.ProcessStaginArea()中
位于System.Windows.Input.InputManager.ProcessInput(InputEventArgs
输入)
位于System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr
hwnd,InputMode,Int32时间戳,
Int32 y,Int32车轮)
lpram、Boolean&(已处理)
在System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr
hwnd、Int32 msg、IntPtr wParam、IntPtr
lpram、Boolean&(已处理)
lpram、Boolean&(已处理)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(对象
回调,对象参数,布尔值
位于System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象
源、委托回调、对象
args,布尔参数,
在System.Windows.Threading.Dispatcher.WrappedInvoke(委托
回调,对象参数,布尔值
IsSingle参数,委托
捕手)
位于System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority
优先级、TimeSpan超时、委托
方法,对象参数,布尔值
IsSingle参数)
优先级、委托方法、对象参数)
在MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr
(内存)
味精)
位于System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame
(框架)
位于System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame
(框架)
在System.Windows.Threading.Dispatcher.Run()中
位于System.Windows.Application.RunDispatcher(对象
忽略)
(窗口)
(窗口)
在System.Windows.Application.Run()处
在中的WpfDatagridTest.App.Main()处
0
位于System.AppDomain.\u下一个安全组件(程序集
程序集,字符串[]args)
位于System.AppDomain.ExecuteAssembly(字符串
档案、证据
assemblySecurity,字符串[]args)
在Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()上
在System.Threading.ThreadHelper.ThreadStart\u上下文(对象
(州)
在System.Threading.ExecutionContext.Run(ExecutionContext
回调(对象状态)
位于System.Threading.ThreadHelper.ThreadStart()处
内部异常: