title: How to count characters length from a column in database and put them in a new column showing in datagridview
body: <p>Basically, I have a database with a table named anuncios with this columns:</p>
  
  <pre><code>idAnnouncements | title | message | idClients (foreign key)|
  </code></pre>
  
  <p>, and I have another table named detalhefatura with this columns:</p>
  
  <pre><code>idAnnouncements | idFatura (foreign  key) | subTotal
  </code></pre>
  
  <p>IN C#: When I click in a button, I want to count the letters from the message column in Announcements table, and put them into the column subTotal, like this </p>
  
  <p><a href="http://prntscr.com/mbijxs" rel="nofollow noreferrer">http://prntscr.com/mbijxs</a></p>
  
  <p>Is it needed a query or only c# code?</p>
  
  <p>This is what I got, to put in the label u see in the printscreen above, the amount of all characters with the same ClientID</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
      {
  
          {
              var linhas = dataGridView.Rows.Cast&lt;DataGridViewRow&gt;().Select(r =&gt; Convert.ToString(r.Cells["mensagem"].Value));
              double somaLinhas = linhas.Sum(r =&gt; r.Length * 0.02);
              lbltotal.Text = string.Format(@"{0:#,##0.00}", somaLinhas);
  
  
          }
  
      }
  </code></pre>