bind data to gridview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lyne_asp
    New Member
    • Aug 2006
    • 20

    bind data to gridview

    Hello everybody,

    PLease help me to bind the data from datasource to a dridview, here is my command

    Code:
     OracleDataAdapter adTarget = new OracleDataAdapter
                   ("SELECT  B.DMAIC_DESC DMAICDESC ,a.TARGET_MONTH    MONTH , a.TARGET_YEAR YEAR FROM SIXSIGMA_USER.DMAIC_TARGET A, SIXSIGMA_USER.DMAIC B WHERE a.PROJECT_ID = '" + DropDownListProject.SelectedValue + "'  AND A.DMAIC_CODE = B.DMAIC_ID ", Conn);
            
    
            DataSet dsTarget = new DataSet();
            adTarget.Fill(dsTarget);
            GridViewTarget.DataSource = dsTarget.Tables[0];
            GridViewTarget.DataBind();
    I cant bind it to gridview, while when my select Command is from a one table, this code works, like the code below

    Code:
    OracleDataAdapter adTarget = new OracleDataAdapter
                   ("SELECT  *    FROM SIXSIGMA_USER.DMAIC_TARGET  WHERE PROJECT_ID = '" + DropDownListProject.SelectedValue + "'  ", Conn);
            
    
            DataSet dsTarget = new DataSet();
            adTarget.Fill(dsTarget);
            GridViewTarget.DataSource = dsTarget.Tables[0];
            GridViewTarget.DataBind();
    Thanks in advance
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    So the problem is with your select query?

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      You are unable to bind to the grid
      or
      unable to retrive the desired data from database ?

      Comment

      Working...