R
Ralf Christoff
Hi,
this Code works fine under Windows:
SqlConnection conn = new SqlConnection(.SQLCon);
SqlCommand cmd = new SqlCommand(SQL, conn);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
adapter.Fill(ds);
if(ds.Tables.Count>0)
{
dg_Query.SetDataBinding(ds,"Table");
tabControl1.TabPages[0].Controls.Add(dg_Query);
}
if(ds.Tables.Count>1)
{
dg_Query1.SetDataBinding(ds,"Table1");
tabControl1.TabPages[1].Controls.Add(dg_Query1);
}
but with .net Compact Framework
dg_Query.SetDataBinding(ds,"Table"); not work because
datagrid dg_Query has no "SetDataBindings" has no definition.
How can i bind in this example my dataset to the datagrid?
sorry for my bad english,
thanx,
Ralf
this Code works fine under Windows:
SqlConnection conn = new SqlConnection(.SQLCon);
SqlCommand cmd = new SqlCommand(SQL, conn);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
adapter.Fill(ds);
if(ds.Tables.Count>0)
{
dg_Query.SetDataBinding(ds,"Table");
tabControl1.TabPages[0].Controls.Add(dg_Query);
}
if(ds.Tables.Count>1)
{
dg_Query1.SetDataBinding(ds,"Table1");
tabControl1.TabPages[1].Controls.Add(dg_Query1);
}
but with .net Compact Framework
dg_Query.SetDataBinding(ds,"Table"); not work because
datagrid dg_Query has no "SetDataBindings" has no definition.
How can i bind in this example my dataset to the datagrid?
sorry for my bad english,
thanx,
Ralf