Thursday, September 6, 2007

Iron Phyton with ASP.Net Futures

Here is the example... how to nice it is using Iron phyton to filter your Grid View which generated from DynamicList

* Restrict your column...
def GetColumns() :
return ["Column1","Column2",....]

* Add your custom column
def GetColumns() :
return ["Column1","Column2",....
["My Custom Column", lambda: "%s (%s)" % (Column3, Column4)]
]

* Rule level formating for your view
From System.Drawing import Color
def InitRow(row):
if "myKeyword" in Column1 :
row.BackColor = Color.Green


How easy it is ????

No comments: