I have a window form that has a datagridview. In this datagridview i am adding two columns dynamically as shown in below code.My problem is that when i click on these added columns ,Multiselect property is not selecting full row but when i click on first column of grid it selected full row.
if (gvlayoutload.Columns.Count == 0)
{
DataGridViewTextBoxColumn comboBoxColumnRInfo =
new DataGridViewTextBoxColumn();
comboBoxColumnRInfo.Name = "RowInfo";
comboBoxColumnRInfo.HeaderText = "";
comboBoxColumnRInfo.DataPropertyName = "RowInfo";
comboBoxColumnRInfo.ReadOnly = true;
comboBoxColumnRInfo.Width = 25;
comboBoxColumnRInfo.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
//comboBoxColumnRInfo.Frozen = true;
this.gvlayoutload.Columns.Add(comboBoxColumnRInfo);
DataGridViewTextBoxColumn comboBoxColumn =
new DataGridViewTextBoxColumn();
comboBoxColumn.HeaderText = "Row #";
comboBoxColumn.DataPropertyName = "RowNo";
comboBoxColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet;
comboBoxColumn.Width = 45;
comboBoxColumn.FillWeight = 45;
//comboBoxColumn.Frozen = true;
FRColumn col = new FRColumn();
col.Name = comboBoxColumn.HeaderText;
col.Type = 1;
col.Variable1 = variable1;
col.Variable2 = variable2;
col.Percent = Percent;
col.Rowno = Rowno;
col.Headersize = 8;
col.Bodysize = 8;
col.HeaderAlign = 0;
col.BodyAlign = 0;
lstcolumn.Add(col);
this.gvlayoutload.Columns.Add(comboBoxColumn);
When i click on RowInfo column or Row # column Multiselect property not selected full row.I have set multiselect property to true and multiselection mode is fullrowmode.