471,582 Members | 1,361 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,582 software developers and data experts.

GridView FormView not in sync

I have a GridView and a FormView serve as master/detail relation.
The GridView has paging enabled - 10 rows/page.

The formView is linked to gridView's SelectedValue as the sole
parameter.

All works well, for example:

1. Select the first row in GridView; The FormView shows the detail
correspond to the first record.
2. Select another page, the same row (number) is automatically
selected; The formView shows the correct info.

BUT, there is one exception:
1. Select the last row in first page; The FormView is good.
2. Select the last PAGE (which only has 5 rows); No row is selected and
FormView shows nothing.
3. I then select the previous page. The last row IS SELECTED in
GridView. BUT FormView SHOWS NOTHING.

I tried to look at the values in the code (PageIndexChanged Event). The
SelectValue of the gridview is not even set yet (null) and the
SelectedIndex is always 9 (the last row).

Any explaination? How can I fix this? All I care is master and detail
are in sync. I also tried to just simple change the SelectedIndex to
the lastRow if totol rows are less than 10 but what property can be
used to determine this?

Thanks

John

Nov 9 '06 #1
0 1492

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dabbler | last post: by
1 post views Thread by Kyle K. | last post: by
1 post views Thread by joechipubik | last post: by
reply views Thread by ThePurpleCat | last post: by
2 posts views Thread by needin4mation | last post: by
reply views Thread by =?Utf-8?B?TGFkaXNsYXYgTXJua2E=?= | last post: by
5 posts views Thread by =?Utf-8?B?QWRhciBXZXNsZXk=?= | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.