Row_Rendered in VB

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
rodrigofaustino2
User
Posts: 28

Row_Rendered in VB

Post by rodrigofaustino2 »

the help file brings the following code, but it does not work if I generate the files in vbhtml, someone has help pages generated in vbhtml?

public void Row_Rendered() {
// ew_VarPrint(RowAttrs, Trademark);

// Change the row color in List page
 if (ew_SameStr(Trademark.ViewValue, "BMW"))
     RowAttrs["style"] = "color: red; background-color: #ccffcc";

 // Change the cell color
 if (ew_SameInt(Cyl.CurrentValue, 4)) {
     Cyl.CellAttrs["style"] = "background-color: #ffcccc";
 } else if (ew_SameInt(Cyl.CurrentValue, 6)) {
     Cyl.CellAttrs["style"] = "background-color: #ffcc99";
 } else if (ew_SameInt(Cyl.CurrentValue, 8)) {
     Cyl.CellAttrs["style"] = "background-color: #ffccff";
 }

// Change text style
 if (ew_SameStr(Category.CurrentValue, "SPORTS"))
     Category.ViewAttrs["style"] = "color: #00cc00; font-weight: bold; background-color: #ffff99";

}


motfs
User
Posts: 258

Post by motfs »

The code in the help file is for C#. You need to convert the codes to VB.

if (ew_SameStr(Trademark.ViewValue, "BMW"))

In VB, it will be:
If ew_SameStr(Trademark.ViewValue, "BMW") Then
...
End If

There is no ";" and use ("style") instead of ["style"]. Try to learn VB in Microsoft's site.

I'd suggest that you use C#, read: http://www.hkvforums.com/viewtopic.php?f=7&t=37678


rodrigofaustino2
User
Posts: 28

Post by rodrigofaustino2 »

thank you


Post Reply