Sort DataView by Column Length
<p>I am trying to Sort a DataView based on the length of a column. So I am creating a DataView like so:</p>

<pre><code>        string connStr = ConfigurationManager.ConnectionStrings["SiteSqlServer"].ConnectionString;
        SqlConnection conn = new SqlConnection(connStr);
        SqlCommand cmd = new SqlCommand("CPC_GetLeads", conn);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add(new SqlParameter("@DateTo", txtDateTo.SelectedDate));
        cmd.Parameters.Add(new SqlParameter("@DateFrom", txtDateFrom.SelectedDate));
        SqlDataAdapter dap = new System.Data.SqlClient.SqlDataAdapter(cmd);
        DataSet ds = new DataSet();

        // open conn
        if (conn.State == ConnectionState.Closed)
            conn.Open();


        // fill
        dap.Fill(ds);

        // close the conn
        if (conn.State == ConnectionState.Open)
            conn.Close();
        return ds.Tables[0].DefaultView;
</code></pre>

<p>This DataView has several columns. But I have one column named <code>qc</code>. I would like to sort it by the length of qc. How would I go about doing something like that? Thanks!</p>
