datagrid in vs2002 versus vs2005 express edtion
hi,
this code is work well in vs2002 C# but not in vs2005 express edition. Any have idea about the issue here? Or someone can give me in detail on how to put data to a datagrid in vs2005?
Code:
dataset ds = new dataset();
MySqlDataAdapter myadapter = new MySqlDataAdapter();
myadapter.SelectCommand = new MySqlCommand();
myadapter.SelectCommand.Connection = stsqcon.getConnection();
myadapter.SelectCommand.CommandText = " Select * from partmain a inner
join appmodel b on a.p_code=b.p_code inner join vehicle c on c.veh_code =
b.veh_code where b.veh_code =?veh_code order by p_desc";
myadapter.SelectCommand.Parameters.Add("?veh_code",MySqlDbType.Int32 ,4);
myadapter.SelectCommand.Parameters["?veh_code"].Value = lv1.SelectedItems[0].SubItems[1].Text;
myadapter.Fill(ds,"partmain");
dataGrid1.DataSource = ds;
thanks,
Popskie
Re: datagrid in vs2002 versus vs2005 express edtion
And what exactly is the problem in 2005? You say the code doesn't work well but you give no indication of the symptoms. The DataGrid is still available in .NET 2.0 but the DataGridView would be the way to go unless you have a good reason not to use it. It is a different beast though, so it will not behave exactly the same way.
Re: datagrid in vs2002 versus vs2005 express edtion
Ohhhh shame on my self jm. Im too careless about datagrid and datagridview. LOL
thanks jm for reminding me. heheh.