Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
GridView Code: e.Row.RowType == DataControlRowType.DataRow

What is equalent code for datagrid
Posted

Hi,

The closest equivalent is the ListItemType Enumeration.

Have a look at the documentation[^] for usage.

... hope it helps.
 
Share this answer
 
DataGrid does not have structure like Row Column. It have Customized structure having Item so you have to check like
e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem

There is 7 ItemType for DataGrid
Header
Footer
Item
AlternatingItem
SelectedItem
EditItem
Separator
Pager
 
Share this answer
 
C#
if((e.Item.ItemType == ListItemType.Item) ||
             (e.Item.ItemType == ListItemType.AlternatingItem))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900