bind datasets in a single gridview
-
I am taking three dataset and i want to bind all dataset value in a single gridview.so plz can help me???????? vivek sachan 9582134764
DataSet ds = dut.getDataSet("select Class,CurrentLevel,Name from Tbl_StudentDetails where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR in ds.Tables[0].Rows) { string s2 = DR["Class"].ToString(); string s3 = DR["CurrentLevel"].ToString(); string s4 = DR["Name"].ToString(); } DataSet ds1 = dut.getDataSet("select count(Status) from Tbl_Attendence where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR1 in ds1.Tables[0].Rows) { string s5 = DR1["Status"].ToString(); } DataSet ds2 = dut.getDataSet("select FMonth,Fyear,TPendingFee,Fees from Tbl_SFee where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR2 in ds2.Tables[0].Rows) { string s6 = DR2["FMonth"].ToString(); string s7 = DR2["Fyear"].ToString(); string s8 = DR2["TPendingFee"].ToString(); string s9 = DR2["Fees"].ToString(); }
-
I am taking three dataset and i want to bind all dataset value in a single gridview.so plz can help me???????? vivek sachan 9582134764
DataSet ds = dut.getDataSet("select Class,CurrentLevel,Name from Tbl_StudentDetails where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR in ds.Tables[0].Rows) { string s2 = DR["Class"].ToString(); string s3 = DR["CurrentLevel"].ToString(); string s4 = DR["Name"].ToString(); } DataSet ds1 = dut.getDataSet("select count(Status) from Tbl_Attendence where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR1 in ds1.Tables[0].Rows) { string s5 = DR1["Status"].ToString(); } DataSet ds2 = dut.getDataSet("select FMonth,Fyear,TPendingFee,Fees from Tbl_SFee where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR2 in ds2.Tables[0].Rows) { string s6 = DR2["FMonth"].ToString(); string s7 = DR2["Fyear"].ToString(); string s8 = DR2["TPendingFee"].ToString(); string s9 = DR2["Fees"].ToString(); }
there is no need for three dataset , all your calculation based on rollno . just create stored procedure in database and join thes three tables on the bases of rollno . after that fetch this in single dataset and bind with grid.
-
I am taking three dataset and i want to bind all dataset value in a single gridview.so plz can help me???????? vivek sachan 9582134764
DataSet ds = dut.getDataSet("select Class,CurrentLevel,Name from Tbl_StudentDetails where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR in ds.Tables[0].Rows) { string s2 = DR["Class"].ToString(); string s3 = DR["CurrentLevel"].ToString(); string s4 = DR["Name"].ToString(); } DataSet ds1 = dut.getDataSet("select count(Status) from Tbl_Attendence where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR1 in ds1.Tables[0].Rows) { string s5 = DR1["Status"].ToString(); } DataSet ds2 = dut.getDataSet("select FMonth,Fyear,TPendingFee,Fees from Tbl_SFee where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR2 in ds2.Tables[0].Rows) { string s6 = DR2["FMonth"].ToString(); string s7 = DR2["Fyear"].ToString(); string s8 = DR2["TPendingFee"].ToString(); string s9 = DR2["Fees"].ToString(); }
-
I am taking three dataset and i want to bind all dataset value in a single gridview.so plz can help me???????? vivek sachan 9582134764
DataSet ds = dut.getDataSet("select Class,CurrentLevel,Name from Tbl_StudentDetails where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR in ds.Tables[0].Rows) { string s2 = DR["Class"].ToString(); string s3 = DR["CurrentLevel"].ToString(); string s4 = DR["Name"].ToString(); } DataSet ds1 = dut.getDataSet("select count(Status) from Tbl_Attendence where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR1 in ds1.Tables[0].Rows) { string s5 = DR1["Status"].ToString(); } DataSet ds2 = dut.getDataSet("select FMonth,Fyear,TPendingFee,Fees from Tbl_SFee where RollNo='" + Request["RNo"].ToString() + "'"); foreach (DataRow DR2 in ds2.Tables[0].Rows) { string s6 = DR2["FMonth"].ToString(); string s7 = DR2["Fyear"].ToString(); string s8 = DR2["TPendingFee"].ToString(); string s9 = DR2["Fees"].ToString(); }
hi, use those query using union thus it will done by using single dataset praveen