Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. bind datasets in a single gridview

bind datasets in a single gridview

Scheduled Pinned Locked Moved ASP.NET
helpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rummer
    wrote on last edited by
    #1

    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(); }

    S K P 3 Replies Last reply
    0
    • R rummer

      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(); }

      S Offline
      S Offline
      Sneha Bisht
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • R rummer

        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(); }

        K Offline
        K Offline
        Kannan Ar
        wrote on last edited by
        #3

        Concatenating user input to an SQL string may causes to SQL injection attack.

        1 Reply Last reply
        0
        • R rummer

          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(); }

          P Offline
          P Offline
          praveen c byzan com
          wrote on last edited by
          #4

          hi, use those query using union thus it will done by using single dataset praveen

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups