HI everyone
I need to upload datatable values in grid without using datasource.
I need to know how can we find the count value of datatable
My code is
SqlConnection con = new SqlConnection("server=QB_DT_2\\sqlexpress;database=QbAppDb1;user id=sa;password=admin123");
SqlCommand cmd = new SqlCommand("Select * from QbGroups where Groupname = 'primary'", con);
DataTable dt = new DataTable();
SqlDataReader rdr = null;
rdr = cmd.ExecuteReader();
for (int i = 0; i < dt.Rows.Count; i++)
{
RadGrid.Rows.Add();
RadGrid.Rows[i].Cells[0].Value = rdr["QBGUID"].ToString();
RadGrid.Rows[i].Cells[1].Value = rdr["GroupName"].ToString();
}

Priyaranjan K SPosted Oct 9, 2015, 4:25 AM
Vivek JoyPosted Oct 9, 2015, 6:19 AM
Vivek JoyPosted Oct 9, 2015, 5:49 AM
Vivek JoyPosted Oct 9, 2015, 4:01 AM
Priyaranjan K SPosted Oct 9, 2015, 3:36 AM
Vivek JoyPosted Oct 9, 2015, 3:29 AM
Priyaranjan K SPosted Oct 9, 2015, 3:12 AM
Thanks,