Dataview in asp.net
<p>I'm doing an update functionality.I'm displaying all the data's created by the user and also i need to check the data's that are referenced to one particular item.It's just letting the user know that he has all these data's created but only checked ones are referenced to this item.I guess this can be done using dataview.As I'm new to dataview I need help on how to code it in my front end.</p>

<pre><code>            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            SqlCommand command = new SqlCommand("Edit", conn);
            command.CommandType = CommandType.StoredProcedure;
            conn.Open();



            command.Parameters.Add("@id", SqlDbType.NVarChar).Value = id;
            SqlDataReader dr = command.ExecuteReader();
            dr.Read();



            DataSet ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            da.Fill(ds);
            **DataView dv = new DataView();
            GridView1.DataSource = ds.Tables[0].DefaultView;**

        // DataView dView = ds.Tables[0].DefaultView;
            //GridView1.DataSource = ds;
            GridView1.DataBind();






                conn.Close();


        }
    }
</code></pre>
