Thursday, February 26, 2009

Binding Navigator in C#.net

SqlCommand query = new SqlCommand("SELECT * from TableName", myConn);
SqlDataAdapter adrQuery = new SqlDataAdapter(query);
DataSet dsQuery = new DataSet();
adrQuery.Fill(dsQuery);

BindingNavigator _bindnav = new BindingNavigator(true);
_bindsrc.DataSource = dsQuery;
_bindnav.BindingSource = _bindsrc;
DataGridView.DataSource = _bindsrc;

No comments:

Post a Comment