Hi Irnbru,
You should use DataView. here is some sample code for you.
SqlCommand cmd = new SqlCommand();
SqlConnection con = new SqlConnection();
DataSet ds = new DataSet();
SqlDataAdapter adap = new SqlDataAdapter();
SqlDataReader rdr ;
con.ConnectionString = @"server=.;database=AdventureWorks;uid=sa;pwd=s a";
con.Open();
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = @"select LocationID,Name as LocNAme from
Production.Location";
adap.SelectCommand = cmd;
adap.Fill(ds, "ER");
DataRow[] dr = ds.Tables[0].Select();
dataGrid1.DataSource = dr[0].Table.DefaultView;
vinu
"irnbru irnbru" <le*********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi all! I got an array of datarows after a select on a datatable, I want
to show the results in datagrid, but it doesnt work, do i have to create
a dataview? Please help me out thank you IRNBRU
*** Sent via Developersdex http://www.developersdex.com ***