Getting columns rowHandle as i loop through it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sl1ver
    New Member
    • Mar 2009
    • 196

    Getting columns rowHandle as i loop through it

    Hi

    im loading my table using a dataset, now i created my own column in the grid that does not belong to the grid and im trying to individually load the cell values once the grid is loaded

    Code:
      foreach (DataTable table in rightsDS.Tables)
                {
                    foreach (DataRow row in table.Rows)
                    {
                        string source = strCon;
                        string command = "SELECT RTR__OPTION from qx_RoleRights where rtr__rts_id =" + row["RTS__ID"].ToString() + " and rtr__rol_id = " + roleID;
                        OleDbConnection mConnection = new OleDbConnection(source);
                        mConnection.Open();
                        OleDbCommand mCommand = new OleDbCommand();
                        mCommand.Connection = mConnection;
                        mCommand.CommandText = command;
                        OleDbDataReader mReader = mCommand.ExecuteReader();
    
                        if (mReader.HasRows)
                        {
                           
                                while (mReader.Read())
                                {
                                   // Here is where i want to set the cellvalue of the column depending on the rowHandle that i need... How do i get it?                                     
                                }
    
                                mReader.Close();
                                mConnection.Close();
                           
                        }
                    }
Working...