数据网格视图最后一行值清除文本框VB.net [英] data grid view last row value clear text boxes VB.net

查看:61
本文介绍了数据网格视图最后一行值清除文本框VB.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows窗体上有一个数据网格视图和数字文本框以及其他UI控件。数据网格视图具有数据网格视图选择更改事件。当用户选择数据网格视图并单击批准按钮时,与该行相关的数据将移动到下一个表单。这个
方式所有行都从数据gridview中清除并带有批准按钮。但是在最后一行,当用户单击它时,相应的值显示在文本框中,单击批准按钮时,数据网格视图变为空,但文本框仍然是
包含最后一行(数据网格视图)值。我们如何清除这些测试盒。我尝试用txtbox.text =""清除文本框。但仍有数据保留在文本框中。

I have a data grid view and number text boxes and other UI controls on windows form. The data grid view has data gridview selection changed event.when the user selects data grid view and click approve button the data related to that row moves to next form.This way all the rows are cleared from data gridview with approve button. However on last row, when the user clicks it the corresponding values are displayed in text boxes and on click of the approve button the data grid view becomes empty but the text boxes still contains last row(datagrid view) values. How can we clear these test boxes. I tried clearing the text boxes with txtbox.text="" but still data retains in text box.

推荐答案

您好

您需要显示正在使用的代码以获得一些帮助。

You will need to show the code you are using in order to get some help.

您还需要解释DataGridView中的数据来自哪里 - 是一个绑定到的DataTable它 - 或其他什么?

You will also need to explain where the data in the DataGridView is coming from - is a DataTable bound to it - or something else?


这篇关于数据网格视图最后一行值清除文本框VB.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆