The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am using DataGrid from syncfusion in VUE. I want to change the row background color when it selected in datagrid. when i select row then row color change in VUE. and also when it deselect then back to normal .css
PGPraveenkumar Gajendiran Syncfusion Team September 10, 2020 01:35 PM UTC
Hi Shivani,
Greetings from Syncfusion support.
Query: “I want to change the row background color when it selected in datagrid. when i select row then row color change in VUE. and also when it deselect then back to normal .css”
Based on your query, we infer that you want to customize the row background color when it selected in Grid. We suggest you to use below CSS to achieve your requirement.
.e-grid td.e-active{
background-color: #887f6c;
}
We have prepared a sample based on this for your reference.
Please check the below screenshots for your reference.
When row is selected:
When row is deselected:
Regards, Praveenkumar G
SHShivaniSeptember 14, 2020 05:13 AM UTC
Hello, Sorry for this again, but I cannot see which function you called on row selected?
PGPraveenkumar Gajendiran Syncfusion Team September 15, 2020 02:16 PM UTC
Hi Shivani,
We would like to inform you that we have not called any method to achieve your requirement. By default in EJ2 Grid, the “e-active” class will be added in the td element of the selected row. Based on this we add the background-color style to that class element. The “e-active” class will be removed once you have deselected the row.
Please find the definition and documentation on Grid’s rowSelected and rowDeselected event below.
rowSelected- Thisevent triggers When a row is selected.
rowDeselected- This event triggers When a selected row is deselected.