DataKey on RowDataBound


/ Published in: VB.NET
Save to your folder(s)

If you need to get the DataKey value in RowDataBound (e.g. Assigning the DataKey to the CommandArgument of a button):


Copy this code and paste it in your HTML
  1. SomeButton.CommandArgument = Convert.ToString(YourGridview.DataKeys(e.Row.RowIndex).Values(0).ToString())

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.