Prevent CSS Class Change when click on row

Hello,

I'm using args.Row.AddClass("my-bold-class") within the RowBound event to make some of the rows bold based on some criteria.

This works fine. The problem is when I click on the row, the bold temporarily goes away. I want the bold (or whatever class I chose) to stay even when clicked.

Additionally, I'd like to remove the darker selection border around the cell.

Image_7717_1696542011594


1 Reply

PS Pon Selva Jeganathan Syncfusion Team November 10, 2023 03:59 PM UTC

Hi Craig Mynatt,


Query: when I click on the row, the bold temporarily goes away. I want the bold (or whatever class I chose) to stay even when clicked.

Query: like to remove the darker selection border around the cell.


We achieved your query by using the below styles,


<style>

 

 

   /*  The text is bold when row is selecting / initial rendering */

 

    .e-grid td.e-cellselectionbackground, .addfontweight {

      

        font-weight: bold;

    }

 

        /*  remove the cell selected border */

 

    .e-grid .e-focused:not(.e-menu-item):not(.e-editedbatchcell) {

        box-shadow: none !important;

    }

</style>


Refer to the below screenshot,


Image_8064_1699631953365


Refer to the below sample,

https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorApp1local-861390653


Kindly get back to us for further assistance.


Regards,

Pon selva


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.





Loader.
Up arrow icon