如何将数据库里的东西通过datagridView显示出来?求助求助
现在已经做到把数据添加到数据库里了..可是不会把它显示出来在前台..想用DataGridView控件实现..不知道该怎么写..我的Grid名字是ManSupermarket_Load。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAL;
namespace frmEmpInfo
{
public partial class ManSupermarket : Form
{
public ManSupermarket()
{
InitializeComponent();
}
private void ManSupermarket_Load(object sender, EventArgs e)
{
this.datagridsuper.DataSource = null;
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void dataGridView1_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
{
}
}
}