更改 Telerik radgrid 将行标记为“已修改”的方式
我正在 Visual Studio 2008 (C#) 中使用 Telerik Winforms Radgrid 版本 2009.2.9.701,我遇到了我似乎找不到解决方案的问题。
当填充 radgrid 并且用户更改行内的单元格时,该行不会被标记为“已修改”,直到用户实际单击数据网格上的另一个位置。如果用户修改一行中的任何值并立即单击我的 winform 上的“保存”按钮,则该行不会被标记为已修改,并且不会显示在我的修改行列表中。
我正在使用以下代码来收集修改的行...
DataTable modifiedRows = dataTable.GetChanges(DataRowState.Modified);
我的问题如下:当用户更改行中任何单元格中的值时,是否有一种方法可以将行标记为“已修改”,而无需用户在单击“保存”按钮之前单击该行。我似乎找不到将数据行标记为“已修改”的标志。
感谢您的帮助,非常感谢。
I am working with the Telerik Winforms Radgrid version 2009.2.9.701 in visual studio 2008 (C#) and I've come across and issue I can't seem to find a solution for.
When the radgrid is populated and the user changes a cell within a row, the row is not flagged as "modified" until the user actually clicks onto another location on the datagrid. If the user modifies any values in a row and immediately clicks the "Save" button on my winform, the row is not flagged as having been modified and is not showing up in my list of modified rows.
I am using the following code to gather the modified rows ...
DataTable modifiedRows = dataTable.GetChanges(DataRowState.Modified);
My question is as follows: Is there a way to mark a row as "Modified" when the user changes a value in ANY cell in the row, without the user having to click off of the row before clicking the save button. I can't seem to find the flag that marks a data row as "Modified".
Thank you for your help, it is much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能需要解决一些问题,但是您可以让“保存”按钮在单击时将焦点移离网格吗?这可能会导致网格行被标记为已修改。
This might be a bit of a work around but can you make the Save button move the focus off the grid when clicked? This may cause the grid row to be marked Modified.