Hi , I have an hierachical ultrawebgrid, and what i want is just to display the bands with alternate style but with the parent and chid bands both with the same color.
For example, i want first row and his son row to be gray, and the second row and his band to be white..
hope is clear what i want, and some one answer me with the solution , i couldn´t be able to find the property to do that silly thing!!!
I am using ultrawebgrid 2010 version. (not aikido version).
Thank you!!!
Hello Ignacio,
Let me know if you have further questions related to this.
Regards,LyubaDeveloper Support EngineerInfragisticswww.infragistics.com/support
There is no special property that fits your requirements. Here is how you can achieve the required functionality with a server-side code:
protected void UltraWebGrid1_PreRender(object sender, EventArgs e)
{
foreach (UltraGridRow row in UltraWebGrid1.Rows)
foreach (UltraGridRow childRow in row.Rows)
if (row.IsAlternate())
childRow.Style.BackColor = Color.Green;
else
childRow.Style.BackColor = Color.Red;
}
Hope this helps.
Regards,
Lyuba Petrova
Developer Support Engineer
Infragistics
www.infragistics.com/support
I didn´t find the correct property, or the correct way to do it , so finally i did it by javascript...
function AfterRowExpanded(gridName, cellId) { var row = igtbl_getRowById(cellId); var rowChild = row.getChildRow(); row.Element.style.backgroundColor = "#F3F3F3"; if ((row.getIndex() + 1) % 2 == 0) { row.Element.style.backgroundColor = "#F3F3F3"; rowChild.Element.style.backgroundColor = "#F3F3F3"; } else { row.Element.style.backgroundColor = "#FFFFFF"; rowChild.Element.style.backgroundColor = "#FFFFFF"; } }
if anyone could give another way to do what i want without javascript will be really helpfull!
Thank you!