How to bind a dataset that was created in the Data Access layer to a gridview in the UI?
<p>Below is the code..</p>

<pre><code>namespace ConfigurationSystem.DataAccess
{
    public class DataAccessLayer
    {
        public DataSet GetRoleCreationDetails(int? Roles_Id, string Code, string Name, string IsActive)
        {

            try
            {
                string con = @"Data Source=PAVANKUMAR-PC\PAVAN;Initial Catalog=ConfigurationSystem;Integrated Security=True";
                SqlConnection connection = new SqlConnection(con);
                SqlCommand command = new SqlCommand();
                command.Connection = connection;
                command.CommandType = CommandType.StoredProcedure;
                command.CommandText = "SP_GetRoleCreationDetails";
                command.Parameters.AddWithValue("@UserRole_Id", Roles_Id);
                command.Parameters.AddWithValue("@RoleId", Code);
                command.Parameters.AddWithValue("@UserId", Name);
                command.Parameters.AddWithValue("@IsActive", IsActive);

                SqlDataAdapter adapter = new SqlDataAdapter(command);
                DataSet dataset = new DataSet();
                adapter.Fill(dataset);
                //status = Convert.ToString(command.Parameters["@OuptputParam"].Value);
                return dataset;
            }
            catch (Exception exception)
            {
                throw new ArgumentException(exception.Message);
            }
        }
    }
}
</code></pre>
