How to convert file size in datagridview column value C#
<p>I`m making windows application.</p>

<p>In my application working process is like this</p>

<ol>
<li><p>Write text in Text Box and click Start button</p></li>
<li><p>Matched data showed in DataGridView</p></li>
</ol>

<p>And now I want to convert to file size in Datagridview column</p>

<p>For example, In my database, DBsize value saved in byte foramt like this : 451936256</p>

<p>but It`s hard to count it, So in DataGridView, I want to show convert it like this : 431MB</p>

<p>I showed my button click code below, How can I do that? Please help me.</p>

<p>Thank you</p>

<pre><code>private void btnStart_Click(object sender, EventArgs e)
        {
            string webApplicationName = string.Empty;
            string siteID = string.Empty;
            mtlblError.Text = "no record returned";

            Migration_Status_DAC dac = new Migration_Status_DAC();
            DataSet ds = new DataSet();

            try
            {

                ds = dac.SelectWebApplicationStatus(mtextUrl.Text);
                DataTable dt = ds.Tables[0];


                if (ds != null &amp;&amp; dt != null &amp;&amp; dt.Rows.Count &gt; 0)
                {

                    mgrdWebApplication.DataSource = dt;
                }
                else
                {
                     mtlblError.Visible = true;
                }
            }
            catch(Exception ex)
            {
                LogWrite.writeLog(ex.ToString();
            }
        }
</code></pre>