hi
this code help you
sepode you have a dataGridView that its name is dataGridView1
type follow code into your program
sqlconnection con =new sqlconnection("server=(local);database=database name;Integrated Security=True");
dataView dv = new dataView();
dataTable dt =new dataTable();
sqlDataAdapter da =new sqlDataAdapter("select * from tableName",con);
da.fill(dt);
dv=dt.DefultView;
dataGridView1.dataSource=dv;
kiani mehdi
|