aspxtreme

DataGridItem.ItemType Property

System.Web.UI.WebControls Namespace   DataGridItem Class


Returns the type of an item in a DataGrid control.

Syntax


Script [ ListItemType variable = ] DataGridItem.ItemType

Property Value


variable One of the ListItemType enum values.

The property is read only with no default value.

Remarks

Use the ItemType property to determine the type of a DataGridItem in a DataGrid control.

Example

The following example demonstrates how to use the ItemType property to determine the type of an item in a DataGrid control. The order in which the items are positioned in the DataGrid is displayed along with the item type.


foreach ( DataGridItem item in myGrid.Items ) {
   msg.Text += "<br>" + item.ItemIndex + " " + item.ItemType;
}
  C# VB

 Show me 

See Also

DataGridItem Members   ItemIndex



Books and more ...


Suggested Reading

Need a break ?



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme