Hi all,
Im adding a column after the dataGridView is populated.
Then I want to add LinkLables to that column.
how to do this.
PLZ help me.
I've tried this.But it gives me an error.
this is my buton click.its ok.
private void button1_Click(object sender, EventArgs e)
{
Search ser = new Search();
DataSet drr= ser.GetBookDetail(int.Parse(textBox3.Text));
DataTable myDataTable = drr.Tables["table1"];
dataGridView1.DataSource = myDataTable;
DataColumn dc=new DataColumn("Author");
myDataTable.Columns.Add(dc);
}
But this is not working.
private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)
{
LinkLabel link = new LinkLabel();
dataGridView2.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = link;
}