I have a Datagridview that has some text box columns.In this Datagridview I have added a DataGridViewButtoncolumn
after the third column and I have set it as visible = false as shown in below code.
DataGridViewButtonColumn btnEllipse = new DataGridViewButtonColumn();
btnEllipse.Text = "...";
btnEllipse.FillWeight = 6;
btnEllipse.MinimumWidth = 20;
btnEllipse.Width = 20;
btnEllipse.DividerWidth = 0;
//btnCompanyProperty.HeaderText = "To Company/Property";
btnEllipse.UseColumnTextForButtonValue = true;
dgvForecast.Columns.Insert(4, btnEllipse);
dgvForecast.Columns[4].Visible = false;
dgvForecast.Columns[dgvForecast.Columns["BaseValue"].Index + 1].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dgvForecast.Columns[dgvForecast.Columns["BaseValue"].Index + 1].Width = 20;
dgvForecast.Columns["BaseValue"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;
dgvForecast.Columns["BaseValue"].CellTemplate.Style.Alignment = DataGridViewContentAlignment.MiddleRight;
Now My problem is that I have to show only this button cell when i click on index 3 cell.Now this is showing full Button column when i click on index 3 cell as shown in below image.I only want to show selected row button cell not full Button Column.
I want that when i click on first row value cell only first row Button cell should be visible and when i click on second row value cell first row button should be invisible and current row button should be visible.