I want to fill GridView ,But i dont want to use datasource..I want to use the method,thru which i add the data using row by row
As in VB.net
Dim row0 As String() = {"A","B","C"};
Me.DataGridFile.Rows.Add(row0)
.
public partial class refresh : System.Web.UI.Page
{
string query;
SqlCommand cmd;
SqlConnection conn;
SqlDataAdapter da;
DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
conn = new SqlConnection("Data Source=MANSI\\SQLEXPRESS;Initial catalog=user;Integrated Security=true;");
conn.Open();
query="select * from info";
cmd=new SqlCommand (query ,conn ) ;
da=new SqlDataAdapter (cmd) ;
ds = new DataSet();
da.Fill (ds);
GridView1 .DataSource =ds;
GridView1 .DataBind ();
conn.Close ();
}