This is a migrated thread and some comments may be shown as answers.

[Solved] Browser "Back" button causes unexpected selection behavior

3 Answers 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jotham
Top achievements
Rank 1
Jotham asked on 10 Apr 2008, 06:20 AM
Hi,

If I select a grid item, submit the page and then click "Back" in my browser, the grid item appears selected, yet I am still able to select other items.  It appears selected, but it isn't treated as though selected.

You can reproduce the behavior on this page in IE7:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/Selecting/DefaultCS.aspx

(1) Deselect "Allow multi-row selection" and click Postback.
(2) Select an item from the 2nd grid on the page and click Postback.
(3) Click the Browser "Back" button.

The grid item remains checked, but if I click on a different grid item, both the new and original items are both checked (but only the row of the new is highlighted).  Upon resubmission only the new item is selected.

Is there a way to have the grid appear as normal if the user clicks the Back button in their browser?

Thanks,
Jotham

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 10 Apr 2008, 06:04 PM
Hello Jotham,

I tested the example and noticed the behavior you have described. Actually this is not an issue with the Grid and its settings. If you test sample project with just one checkbox and an asp button the result will be the same- after using Back Button of the browser the checkbox still appears as checked.

Sincerely yours,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jotham
Top achievements
Rank 1
answered on 10 Apr 2008, 11:32 PM
Hi Maria,

Thanks for the quick response.

I should have included another step in my original post.

(4) Select a different grid item.  Both the new and original items will appear checked, even though the grid is in single-select mode.

The issue is not that the grid item is selected upon clicking Back.  That is expected.  The problem is that in the case of a RadGrid where multi row selection is turned off, if a user uses the Back button as in the scenario I've described, they can end up with multiple items being checked.  Selecting a 2nd item should clear the check of the 1st item, but this is not happening.

This is a very minor issue, but do you know if there is a way to fix this behavior?

Thanks,
Jotham

0
Maria Ilieva
Telerik team
answered on 11 Apr 2008, 12:53 PM
Hi Jotham,

Selecting the second item will clear the first one after update. If you click "PostBack" button after selecting the second item (step 4) the first check will be Removed.

Greetings,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Jotham
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Jotham
Top achievements
Rank 1
Share this question
or