DotNet and AJAX

Friday, July 8, 2011

In GridViewDelete Event KEY values are empty

In the DELETEROWEVENT, the values returned is empty, it appears that e.Keys and e.Values are only populated if gridview.IsBoundUsingDataSourceID.

A possible resolution

int groupId = (int)GridView1.DataKeys[e.RowIndex].Value;
 
Posted by Shibu at 12:02 PM
Labels: GridView

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

My Favorites

  • mattberseth
  • Encosia - AJAX
  • Joe on Dot Net
  • Scott Gurthie

About Me

View my complete profile

Blog Archive

  • ►  2012 (3)
    • ►  June (2)
    • ►  March (1)
  • ▼  2011 (13)
    • ►  December (1)
    • ►  October (1)
    • ►  September (2)
    • ►  August (2)
    • ▼  July (7)
      • GridView RowDataBound or RowCommand
      • Error annot convert method group 'Identifier' to n...
      • Configuring Visual Source Safe in Visual Studio IDE
      • Using Windows User Role with Active Directory
      • Enter Key Default Submit Button
      • Connecting MySQL Database with .NET Applications
      • In GridViewDelete Event KEY values are empty
  • ►  2010 (8)
    • ►  December (1)
    • ►  November (1)
    • ►  October (4)
    • ►  September (2)
  • ►  2009 (1)
    • ►  January (1)
  • ►  2008 (3)
    • ►  November (1)
    • ►  July (2)
  • ►  2007 (6)
    • ►  November (1)
    • ►  October (5)

My Tags

  • Best Practices
  • Cache
  • design
  • GridView
  • GridView RowDataBind
  • MySQL
  • Validation
Watermark theme. Powered by Blogger.