Sep 26, 2007 03:09 PM|hi_zhangying|LINK
I tried this, but it didn't fix the problem for me. After removing most of the fields I have on my grid view, I noticed that the field names with "ID" were causing the problem. Because my grid view was showing two fields "Applicant_ID" and "Position_ID",
the former one is primary key while the latter one is foreign key in this table. It seems that .NET gets confused/sensitive by the fields names with "ID" in it. I replaced the "Position_ID" with "Position_Code", of course, including all the classes/methods/stored
procedures, and it work! I hate to name the field in this way, but what else can I do....
Below is the codes that I have, which populates a gridview that shows applicants based on user's query on first name and last name. By selecting the individual records in the grid view, the user can view detail information of the applicant and can update
information where I encounter the problem:
Detail information for ID.
Position applied for:
MyGridView.PageIndex = e.NewPageIndex;
MyGridView.SelectedIndex = -1;
MyGridView.SelectedIndex = row.RowIndex;