We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

selection/deselection of rows

Hi, In my gridcontrol, when i click on any of the editable cells of the grid the entire row gets selected and that particular cell is highlighted with a black border and white background. But the problem is when i go and click on the row header of any other row or that row itself then also the entire row and that cell remain selected. What i want is that when i go and click on another row then the previous row should be selected and if i click on the Row header of the same row then the entire row should be selected similarly i.e. that cell in which the mouse was clicked should no longer be available for editing. it should be highlighted as any other cell in that row. Can you help?

3 Replies

AD Administrator Syncfusion Team December 7, 2004 10:17 AM UTC

Using, if I drop a GridControl on a form, and then set ListBoxSelectionMode in Form.Load, I do not see the problem you are describing (if I understand it properly). If I click on a regular grid cell, the cell becomes current and shows a white background. But is I then click on the header of a new row, I no longer see a current cell, just a selected row. Here is the sample I used. What are you doing differently? WindowsApplication14_15.zip

SJ Sapna Jain December 13, 2004 08:51 AM UTC

Hi, Actually i have set the enabled property (for the row header and one of the columns) to false. I perform the following steps: 1) Click in any editable cell of any row (say row 1 ) 2) Click in the column either the row header or the column for which the enabled property is false of row 2. Then both row 1 and row 2 are selected. What i want is that only the row 2 should remain selected ? Please help in this regard.

AD Administrator Syncfusion Team December 13, 2004 10:12 AM UTC

Can you post a little sample showing the problem you are having? If I drop GridControl on a form and accept the defalus, and then add this Form Load event handle, I do not see the problem you described? Do you?
private void Form1_Load(object sender, System.EventArgs e)
	this.gridControl1.ListBoxSelectionMode = SelectionMode.MultiExtended;
	this.gridControl1.BaseStylesMap["Row Header"].StyleInfo.Enabled = false;
	this.gridControl1.ColStyles[2].Enabled = false;
	this.gridControl1.ColStyles[2].BackColor = Color.Gray;

Live Chat Icon For mobile
Up arrow icon