Hi,
I have tried to apply different css classes for UltraWebGrid Header,OddRows and EvenRows.
Following is the code used :
UltraWebGrid1.DisplayLayout.HeaderStyleDefault.CssClass = "cssHeader";
UltraWebGrid1.DisplayLayout.RowStyleDefault.CssClass = "cssOddRow";
UltraWbGrid1.DisplayLayout.RowAlternateStyleDefault.CssClass = "cssEvenRow";
It works for header but for rows it takes by default "cssOddRow" class for all row.
If you comment the cssOddRow line then it takes cssHeader class for Header as well as OddRow.it works fine for even row in this case.
Any Idea ?
Thanks,
Raju
Yes, I have the same problem when I upgraded from Infragistics 6.3 to 8.1 CLR35. If you change the "browser" property to "XML" it should fix it. I think it has to do with the way the control get renders.
Anyone able to shed some light with this issue?
Thanks for quick reply.
I have changed the browser property to XML but problem is still there.
Whether I am missing some thing ?
- Raju
Raju,
Do you know if infragistics 7.x has this issue?
paddepal said:Try removing all the inline styles on aspx page for the grid --rowstyledefault and rowalternatestyledefault. Then only set the cssclass on server side.
Ner..I tried that before definitely didn't fix it.
Hey cliffl, Currently I am using Infragistic grid version 7.3.0.0
I am not sure about other versions...
Read this article. http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=10101
Using the following solved some of our issues:
protected void UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e){ e.Layout.OptimizeCSSClassNamesOutput = Infragistics.WebUI.Shared.DefaultableBoolean.False;}
Thanks mateia !!! It's working now.
In my code problem is order of .css class style and .cs apply order.
For any one else, order should be always like following -
.cs
this.UltraWebGrid1.DisplayLayout.RowStyleDefault.CssClass = "RowStyle";this.UltraWebGrid1.DisplayLayout.RowAlternateStyleDefault.CssClass = "RowAltStyle";this.UltraWebGrid1.DisplayLayout.HeaderStyleDefault.CssClass = "HeaderStyle";
this
and in .css
.RowStyle{background-color:Blue;}.RowAltStyle{background-color:White;}.HeaderStyle{background-color:Green;}
RowStyle
background-color
Blue
RowAltStyle
White
HeaderStyle
Green
Hello,
1. Could you tell us in what order are the Row, AlternateRow and Header styles in your .css file ?
2. Maybe these articles will help you
http://forums.archive.infragistics.com/readmessage?id=%3C6a29922e$54d9aac9$5caf8@news.infragistics.com%3E&group=infragistics.products.netadvantage.aspnet.webgrid#%3C6a29922e$54d9aac9$5caf8@news.infragistics.com%3E
http://forums.archive.infragistics.com/readmessage?id=%3C4fe416f$59b393f2$c6bd9@news.infragistics.com%3E&group=infragistics.products.netadvantage.aspnet.webgrid#%3C4fe416f$59b393f2$c6bd9@news.infragistics.com%3E
Hey Guys,
I have found an alternate ways but not sure whether I am correct or not ...
I have commented the below line
and added the following
UltraWebGrid1.DisplayLayout.FrameStyle.CssClass = "cssOddRow";
Now it applies Header style, Alternate row style correctly and for rest of the frame it will take cssOddRow style.
But I am not sure whether it's a correct way ....
Thanks shareeef !!!
Setting OptimizeCSSClassNamesOutput property to false prevents odd rows to take header style.This code resolves my 50% problem.
But Issues are still there. I have to apply different CSS for odd and even row. Following is the code :
The above code by default take cssOddRow style for all rows.
Any solution ?