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

Cell focused when selecting row

Hello.

I´m using the dataGrid component.

I´ve set the selection mode to row.

When I now click a row, the row gets selected, but even the cell I clicked gets focused (border around the cell). Is there a way to disable this behavior? I just want to select the whole row without a border around the cell I ckicked.

Thanks for your help!


3 Replies 1 reply marked as answer

PS Prathap Senthil Syncfusion Team February 9, 2023 10:46 AM UTC

Hi Florian,

Query:” When I now click a row, the row gets selected, but even the cell I clicked gets focused (border around the cell). Is there a way to disable this behavior?”

To remove the focus, we remove the border from the selected row cell and column header using CSS style. Here is a code snippet that you can use for your reference:


<style>

 

  .e-grid td.e-rowcell.e-focus.e-focused{

 

    box-shadow:none;

 

  }

 

  .e-grid th.e-headercell.e-focus.e-focused{

         box-shadow:none;

  }

 

</style>

 




Regards,
Prathap S


Marked as answer

FM Florian Mihalits February 9, 2023 11:05 AM UTC

Perfect, thanks!



SG Suganya Gopinath Syncfusion Team February 10, 2023 06:50 AM UTC

Florian.

We are glad that the provided solution helped to solve the issue. Please get back to us for further assistance. 

We are marking this thread as solved. 

Regards,

Suganya Gopinath.


Loader.
Up arrow icon