如何根据给定的I / P& amp;显示网格视图中的My Access数据点击按钮 [英] How to show My Access data in grid view as per given I/P & by clicking button

查看:71
本文介绍了如何根据给定的I / P& amp;显示网格视图中的My Access数据点击按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





请指导我在vb.net中设计我的简单应用程序。 (我是编程的新人,但你的指导可能会增加我的信心......所以提前感谢)





我的理念是:我正在通过互联网邮寄文件。有时我的客户,即成员打电话给我询问他们的邮件状态。然后有4种可能性1.邮件发送2.邮件发送错误3.邮件反弹4.其他原因(文件正在处理等等)

我想要输入作为MEM_ID即会员ID(询问我的邮件状态)然后点击邮件状态按钮它会在网格视图中显示其状态。



(我的另一名员工每日准备或更新excel表中的MEM_ID,MAIL_STATUS,SENT_DATE)



现在,我给出了我的vb.net项目的场景:



MS Access中有4列:ID,MEM_ID,MAIL_STATUS,SENT_DATE



(我的vb中添加了数据库表) .net项目)



现在我的VB表格有:1 TextBoxMem_ID我想从中接收I / P. 1个命令按钮

邮件状态。 1网格视图显示来自Access数据库的邮件状态。



现在告诉我什么以及在哪里写代码按钮Click Event ..?

Hi,

please guide me to design my simple application in vb.net. (I am very new guy in programming but your guidance may be increase my confidence level....so thanks in advance)


My Concept is : I am doing mailing a documents from internet. sometime my customers i.e. members called me asked about their mail status. then 4 possibilities are there 1. Mail Sent 2.Error in Mail Sending 3.Mail Bounce 4.Other Reasons(documents are in process & etc. etc)
I want when I give input as a MEM_ID i.e. Member ID (which ask me their mail status)then just after clicking on "Mail Status Button" It displays their status in grid view.

(my another employee daily prepare or update "MEM_ID","MAIL_STATUS","SENT_DATE" in excel sheet)

Now Below I give scenario of my vb.net project:

I have 4 Columns in MS Access : ID, MEM_ID, MAIL_STATUS, SENT_DATE

(database table added in My vb.net Project)

now My VB Form having : 1 TextBox "Mem_ID" From which I want to receive I/P. 1 Command Button
"Mail Status". 1 Grid View to show the mail status from Access Database.

now tell me what & where write a code for button Click Event..?

推荐答案

在按钮的click事件中,您可以给出代码。

将数据表分配给网格的datasource属性并调用.Refresh方法刷新网格中的数据表。



以下代码将帮助您





Private Sub btn1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)处理btn1.Click



SunGrid.DataSource = dt

SunGrid.Refresh()



End Sub
In the click event of the button you can give the code.
Assign the datatable in to the datasource property of the grid and call the .Refresh method to refresh the datatable in the grid.

The following code will help u


Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click

SunGrid.DataSource = dt
SunGrid.Refresh()

End Sub


这篇关于如何根据给定的I / P& amp;显示网格视图中的My Access数据点击按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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