I have a data grid that has 10 colums to it. When the data gets bound to it I run a function on one of the rows. This function does some math and returns a number.<BR><BR>What I would then like to do is if the number it returns is less than XX I want that WHOLE row of data to be invisible and not show in the datagrid.<BR><BR>It's kind of a long reason why I can't just return the exact data I want and why I have to do it this way so don't ask Is it possible to turn off rows of the data grid in this function?<BR><BR>Or, I could even make a second function to call to then check a column for that number and then determin to turn it off or not. I just don't know what to use to tell it to turn off that one row.<BR><BR>Thanks.You could use ItemDataBound event to do a runtime inspection and then conditionally set the Visible property to false....<BR><BR>http://www.flws.com.au/showusyourcode/codeLib/code/NET_DataBind.asp?CatID=5I added that code but then have to do something like...<BR><BR> e.Item.Cells(0).Visible = False<BR> e.Item.Cells(1).Visible = False<BR> e.Item.Cells(2).Visible = False<BR> e.Item.Cells(3).Visible = False<BR> e.Item.Cells(4).Visible = False<BR> e.Item.Cells(5).Visible = False<BR> e.Item.Cells(6).Visible = False<BR><BR>...to turn off the 7 cells I have for each row I want to turn off. Is there a way to turn off Rows instead of cells?<BR><BR>The other problem with the above is how the grid looks when you do it....since I use grid lines at 1 pixel any time I set 7 cells to off I get a doubled up border so parts of the table appear to have a 2 pixel lin instead of a 1 pixel line.<BR><BR>Thanks!Waddya think of this....<BR><BR>************************************************** ***********<BR><BR>' Global variable<BR>Dim blnHidePreviousItem As Boolean = False<BR><BR><BR>Protected Sub MyGrid_OnItemDataBound(...)<BR><BR> If blnHidePreviousItem Then<BR> MyGrid.Items.Item(MyGrid.Items.Count - 1).Visible = False<BR> End If<BR><BR> If YourLogicHere Then<BR> blnHidePreviousItem = True<BR> Else<BR> blnHidePreviousItem = False<BR> End If<BR><BR>End SubYes....exactly what I needed. Thanks....you are now offically my hero for today