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

RadPageView didn't release the previous page selection.

2 Answers 80 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Johnny
Top achievements
Rank 2
Johnny asked on 16 Jun 2011, 11:47 AM
Hi!
Im using VB.NET and had created a RadPageView with 2 page.

1st page call = A
2nd page call = B

When first time load A is an default selected page.
When i click on page B it will do checking either file is exist.
if not exist than msgbox will popup and use code to select back the page A

Display page of A is correct but the B button is still in selected mode.
Mean i can see 2 page is selected.

My viewmode for the RadPageVIew is STACK

Hope to get the reply soon.

Thank you!

Regards
Johnny

2 Answers, 1 is accepted

Sort by
0
Jasenko
Top achievements
Rank 1
answered on 17 Jun 2011, 08:54 PM
Hi,

I just had the exact same problem, and after fiddling with it for a while I found a really awful workaround.

If the page whose button is still selected is called "radpageviewpage1", this code will fix it.

radpageviewpage1.enabled = false
radpageviewpage1.enabled = true

That's it.  Just disable and re-enable.

Good luck.
0
Stefan
Telerik team
answered on 21 Jun 2011, 04:05 PM
Hello everyone,

Thank you for writing.

The reported behavior is a known issue of RadPageView. This issue is already logged into our PITS system and it will be addressed in a future release. Feel free to follow this link, where you can add your vote for this issue and also subscribe for its status updates.

Meanwhile, you can work around this issue by setting its VisualState as shown in the following example:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
       
        radPageView1.SelectedPageChanging += new EventHandler<Telerik.WinControls.UI.RadPageViewCancelEventArgs>(radPageView1_SelectedPageChanging);
        radPageViewPage2.Item.MouseLeave += new EventHandler(Item_MouseLeave);
    }
 
    void Item_MouseLeave(object sender, EventArgs e)
    {
        RadPageViewStackItem item = sender as RadPageViewStackItem;
        if (item.IsSelected == false)
        {
            item.VisualState = "RadPageViewStackItem";
        }
    }
 
    void radPageView1_SelectedPageChanging(object sender, Telerik.WinControls.UI.RadPageViewCancelEventArgs e)
    {
        if (e.Page == radPageViewPage2 && RadMessageBox.Show("", "", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.No)
        {
            e.Cancel = true;
            e.Page.Item.VisualState = "RadPageViewStackItem";
        }
    }

I hope you find this information helpful. Should you have any other questions, do not hesitate to contact us.
 
Regards,
Stefan
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
PageView
Asked by
Johnny
Top achievements
Rank 2
Answers by
Jasenko
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or