如何在vb.net中使用网格视图 [英] how to use grid view with vb.net

查看:129
本文介绍了如何在vb.net中使用网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在vb.net上使用gridview

i want to use gridview with vb.net

推荐答案

请参考:
VB.NET中的DataGridView自定义标题 [数据网格视图 [
Please refer:
DataGridView Custom Headers in VB.NET[^]
Data Grid View[^]


^ ]

VB.NET DataGridView的使用 [ ^ ]
VB.NET DataGridView Tutorial[^]

VB.NET DataGridView Usage[^]


这可能对您有所帮助..
This might helps you..
Imports System.Data.OleDb
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="Your .mdb path";"
        Dim sql As String = "SELECT * FROM Authors"
        Dim connection As New OleDbConnection(connectionString)
        Dim dataadapter As New OleDbDataAdapter(sql, connection)
        Dim ds As New DataSet()
        connection.Open()
        dataadapter.Fill(ds, "Authors_table")
        connection.Close()
        DataGridView1.DataSource = ds
        DataGridView1.DataMember = "Authors_table"
    End Sub
End Class



以下链接上也有很多教程.
http://vb.net-informations.com/datagridview /vb.net_datagridview_tutorial.htm [^ ]



There are lots of tutorials available on the following link also.
http://vb.net-informations.com/datagridview/vb.net_datagridview_tutorial.htm[^]


这篇关于如何在vb.net中使用网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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