Gridview: Where is the Row in RowCommand? DisplayIndex(mhinze.com)
submitted by
chrismo111(47) 4 years, 11 months ago
Provides solutions to a frustrating issue: GridViewCommandEventArgs doesn't expose the Row that raised the event. Say you need an itemTemplate for a link button to execute deletes.; how do you get a reference to the correct row?
While the datagrid's DataGridCommandEventArgs exposed the row through it's Item property & e.Item.ItemIndex GridViewCommandEventArgs only three properties: CommandName, CommandArgument & CommandSource (which provides a reference to the gridview itelf). Wtf?! Solutions provided in story. read more...
|category: ASP.NET
|Views: 271
tags:
Gotchas GridViewCommandEventArgs TipsAndTricks ASPNET GridView another
Everyones tags:
Your Tags: