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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to select the whole row, wherever you click?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: April 30, 2011 |
Last Revised Date: March 2, 2015

When you set the ListBoxSelectionMode property, it selects the row on clicking on a cell and the current cell is active. This implies that, its background does not match the rest of the selected row.

To make the current cell look like the rest of the row, subscribe to the TableControlCurrentCellActivating event. In the handler, set e.Inner.ColIndex = 0. This sets the current cell on the header and not conflict with the rest of the selected row.

The following code example is for changing the selection mode and CurrentCell.



The following screenshot illustrates the output.

Figure 1: Selecting the whole row on a single click




2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment
Nov 14, 2016

Value in my cell is hidden when i use above code  , please help me , this is my code :

private void gridPhaChe_TableControlCurrentCellActivating(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellActivatingEventArgs e)
            if (e.Inner.RowIndex > 2)
                TenMonAn_Label.Text = gridPhaChe.Table.CurrentRecord["TEN"].ToString();
                TongPhaChe_Label.Text = gridPhaChe.Table.CurrentRecord["SOLUONG"].ToString();
                ConLai_Label.Visible = false;
                Nhap_button.Visible = true;
                DaPhaChe_txtBox.Enabled = true;
                DaPhaChe_txtBox.Text = "0";
                e.Inner.ColIndex = 0;
Amal Raj Umapathy Selvam [Syncfusion]
Nov 14, 2016

Hi Truong,


Thanks for using Syncfusion products.


We have created a simple sample to reproduce the reported scenario with your provided code. Unfortunately, we could not reproduce the issue “Value in cell is hidden” with the provided code snippet. Please refer to the sample below,


Sample Link



Please create a new incident with your Direct-Trac account using below link for better follow up.




Amal Raj U.


Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon