Live Chat Icon For mobile
Live Chat Icon

How to hide a row in a DataGrid if one of the Column value is zero

Platform: ASP.NET| Category: DataGrid


Protected Sub ItemDB(sender As Object, e As System.Web.UI.WebControls.DataGridItemEventArgs)
	If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.Item Then
		If e.Item.Cells(8).Text = '0' Then
			e.Item.Visible = False
		End If	
   	End If
End Sub ’ItemDB


protected void ItemDB (object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
	if((e.Item.ItemType == ListItemType.Item ) || (e.Item.ItemType == ListItemType.Item ))
		if( e.Item.Cells [8].Text == '0')
			e.Item.Visible = false;

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.