Answers
Mar 12, 2009 - 04:23 AM
SqlConnection connection = new SqlConnection(connection string);
connection.Open();
string sql = "insert into table_name values('','','','','');
SqlDataAdapter dp = new SqlDataAdapter(sql, connection);
DataSet ds = new DataSet();
dp.Fill(ds);
grid_name.DataBind();
connection.Close();
connection.Open();
string sql = "insert into table_name values('','','','','');
SqlDataAdapter dp = new SqlDataAdapter(sql, connection);
DataSet ds = new DataSet();
dp.Fill(ds);
grid_name.DataBind();
connection.Close();
Mar 12, 2009 - 08:40 PM
thankyou for your response.this codings is used to bind the table in gridview i want to insert new row in datatable at design its possible?
Mar 13, 2009 - 12:12 AM
try this one
string sql = "SELECT * FROM TeamMember_table";
SqlDataAdapter dp = new SqlDataAdapter(sql, connection);
DataSet ds = new DataSet();
dp.Fill(ds);
DataTable table = ds.Tables[0];
table.Rows.Add("", "", ..., "")
string sql = "SELECT * FROM TeamMember_table";
SqlDataAdapter dp = new SqlDataAdapter(sql, connection);
DataSet ds = new DataSet();
dp.Fill(ds);
DataTable table = ds.Tables[0];
table.Rows.Add("", "", ..., "")
Mar 20, 2009 - 04:33 AM
thankyou thiru.
Add New Comment