Hi,
Since the upgrade to version 15.1.20151.2123 of the webdatagrid, i can't change the cssclass of a gridrecord.
I have a asp.net webform, in the prerender-method i change the cssclass of some rows using the following code:
GridRecord row = WebGrid.Rows[rowIndex]; if (row != null) row.CssClass = cssClass;
In the version 14.1.20141.2150 this worked perfect.
Is there a new method to change the cssclass or a workaround?
Thanks in advance
Rob
Hello Rob,
Thank you for contacting Infragistics!
How are you setting up the CSS class you are applying to the row? You may want to instead apply it to the cell instead of the row. Where in code are you applying this style?
I have mij css-styles in the aspx :
<style>
.verwijderd
{
background-color:Red;
}
.nieuw
background-color:LightGreen;
</style>
In the codebehind i want to set de color to the complete row. This worked in v14.1 and not anymore in v15.1. Also when i try to do it on a cell it still does not work.
GridRecord row = WebGrid.Rows[rowIndex];if (row != null)
{ row.CssClass = "nieuw";
Thanks for you're help. That should do it.
I will test this in the future, for now we downgraded to 14.1.
We have also some scoll issues in v15.1 and too little time for now to figure it out.
Thank you for the update. I have done some further looking into this matter and it appears when applying styles this way they are being overwritten by the default styles. You can get around this by putting “!important” on the CSS style. You will still want to do this on the cell level. I am attaching a sample that demonstrates this behavior. Note I have removed the default styles to be able to attach to the forums.