hi, i'm trying to remove blank space from datagridview. the datagridview is bind with sqlite database.
after run the project
i use this code
private void Form1_Load(object sender, EventArgs e)
{
try
{
dataGridView1.MaximumSize = new Size(this.dataGridView1.Width, 0);
dataGridView1.AutoSize = true;
using (SQLiteConnection conn = new SQLiteConnection("Data Source=data.db"))
{
string CommandText = "SELECT * FROM testing";
using (SQLiteDataAdapter sda = new SQLiteDataAdapter(CommandText, conn))
{
DataSet ds = new DataSet();
sda.Fill(ds);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
}
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}how can i resolve this....