How to clear a DataGrid
VB.NET DataGrid1.DataSource = Nothing DataGrid1.DataBind() C# DataGrid1.DataSource = null; DataGrid1.DataBind();
How to open a new window without IE menus and toolbars on click of a button
VB.NET Button2 .Attributes.Add (‘onclick’, ‘window.open(’webform1.aspx’,’_blank’,’toolbar=no’)’) C# Button2 .Attributes.Add (‘onclick’, ‘window.open(’webform1.aspx’,’_blank’,’toolbar=no’)’);
How to limit table cell size with long strings
Set style property for the table cell as style=’WORD-BREAK:break-all’
How to display data in multiple columns for a specific Column in a table in an ASP.NET page
Use a DataList control and set RepeatColumns= n n=>Number of columns
How to hide a row in a DataGrid if one of the Column value is zero
VB.NET 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 C# 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; } } }