RadNavigationView - CheckBox in Page

1 Answer 41 Views
NavigationView
Radek
Top achievements
Rank 1
Iron
Iron
Radek asked on 25 Oct 2023, 06:25 AM

Hi,

I try to add checkboxes to page.

I try to this code, but it is not working:

var nve = this.radNavigationView1.NavigationViewElement;
                foreach (var item in nve.Items) {
                    RadCheckBoxElement cb = new RadCheckBoxElement();
                    cb.ToggleStateChanged += cb_ToggleStateChanged;                
                    item.ButtonsPanel.Children.Add(cb);
                }

Thanks in advance!

 

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 25 Oct 2023, 10:39 AM

Hello, Radek,

It seems that you add the RadCheckBoxElements in the RadPageViewNavigationViewItem. To be able to see them you should set ButtonsPanel.Visibility:

RadPageViewNavigationViewElement nve = this.radNavigationView1.NavigationViewElement;
foreach (RadPageViewNavigationViewItem item in nve.Items)
{
    RadCheckBoxElement cb = new RadCheckBoxElement();
    // cb.ToggleStateChanged += cb_ToggleStateChanged;
    item.ButtonsPanel.Visibility = ElementVisibility.Visible;
    item.ButtonsPanel.Children.Add(cb);
}

Should you have other questions do not hesitate to ask.

Regards,
Nadya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Radek
Top achievements
Rank 1
Iron
Iron
commented on 25 Oct 2023, 12:02 PM

Hi,

thank you. ButtonsPanel.Visibility helps

RJ

 

Tags
NavigationView
Asked by
Radek
Top achievements
Rank 1
Iron
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or