Datagrid
-
Hi thr, i m facein problem related 2 datagrid.. i m useing asp.net 1.0 and sqlServer. i want 2 access data in datagrid i have writtent d code as private void Page_Load(object sender, System.EventArgs e) { myconnection = new SqlConnection("server=trainee2;"+ "database=northwind;Trusted_Connection=Yes"); myCommand = new SqlDataAdapter("SELECT " + " * FROM user_master", myconnection); DataSet ds = new DataSet(); myCommand.Fill(ds); DataView source = new DataView(ds.Tables[0]); MyDataGrid.DataSource = source ; MyDataGrid.DataBind(); But i cant view the data..there is no err on page sam.
-
Hi thr, i m facein problem related 2 datagrid.. i m useing asp.net 1.0 and sqlServer. i want 2 access data in datagrid i have writtent d code as private void Page_Load(object sender, System.EventArgs e) { myconnection = new SqlConnection("server=trainee2;"+ "database=northwind;Trusted_Connection=Yes"); myCommand = new SqlDataAdapter("SELECT " + " * FROM user_master", myconnection); DataSet ds = new DataSet(); myCommand.Fill(ds); DataView source = new DataView(ds.Tables[0]); MyDataGrid.DataSource = source ; MyDataGrid.DataBind(); But i cant view the data..there is no err on page sam.
-
Are you sure there is no exception? Just try to debug step by step and one thing make sure the table has data << >>
-
Are you sure there is no exception? Just try to debug step by step and one thing make sure the table has data << >>
-
where did u give the myconnection.open line???? try giving it after u have defined the connection... -- modified at 1:34 Wednesday 22nd February, 2006