B
bkasmai
This is driving me crazy. I need to hide rows that a particular cell is
zero. On debuggng I fiound out that ItemDataBound fires for header only
and not for Item and AlternatingItem
private void grdSelectionList_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem )
{
if (e.Item.Cells[2].Text == "0")
{
e.Item.Visible = false;
}
}
Any help on this will be appreciated.
zero. On debuggng I fiound out that ItemDataBound fires for header only
and not for Item and AlternatingItem
private void grdSelectionList_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem )
{
if (e.Item.Cells[2].Text == "0")
{
e.Item.Visible = false;
}
}
Any help on this will be appreciated.