Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.
protected void OnRowCommand(object sender, GridViewCommandEventArgs e)
    {
        {
            if (e.CommandName == "Select")
            {
                GridViewRow row = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
                int index = row.RowIndex;
                int employeeID = Convert.ToInt32(GridViewNewsFeed.DataKeys[index].Value);
            }

<asp:TemplateField  HeaderText="Title" >

'>

        }
    }

I get this error ... DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'employeeID'.

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.