Question about Alternating Item style

1 Answer 90 Views
Grid
Olga
Top achievements
Rank 1
Iron
Olga asked on 12 Dec 2023, 08:56 PM

Hello,

I have a master grid with multiple rows, each row has a detail grid (sub-grid).  I do not explicitly set Item Style and Alternate Item Style anywhere in the code and yet somehow items in the detail sub-grid displayed in alternating pattern (even rows with white background  and odd rows with light blue background), but items in the master grid do not have this alternating pattern and all have the same style.

Any idea why its different for master and details grid? How do I turn off Alternating Item Style for the entire grid?

Thanks,

Olga 

1 Answer, 1 is accepted

Sort by
0
Vasko
Telerik team
answered on 14 Dec 2023, 10:29 AM

Hi Olga,

The issue you're experiencing looks like it might be related to some CSS styles overriding others, therefore making the Grid have the same colors for regular/alt rows in its Master table and different ones for its Details table. 

I would suggest using the Browser's DevTools and inspecting the elements to see where those styles are coming from.

To narrow down the issue, I would suggest inspecting the HTML elements and the styles applied to them. You can follow the suggestions in the first two points of the Improve Your Debugging Skills with Chrome DevTools blog post explaining how to inspect the generated HTML and check the applied styles for various elements. 

Once you know the styles you need to override, you can use the same style selector and add "html body " in front of it to make it more specific, and "stronger". More on CSS specificity you can find here: 

To learn more about CSS styling and using the Browser's developer tools, you may find the following videos useful: 

Hope this helps you out.

Kind regards,
Vasko
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Tags
Grid
Asked by
Olga
Top achievements
Rank 1
Iron
Answers by
Vasko
Telerik team
Share this question
or