Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
Accessing Embedded Controls
posted

I hope this makes sense and doesn't sound too stupid on my part.

We purchased .NET Advantage 2011 Vol 1 recently and I used a WebPanel to successfully load a series of "Search Options" for the user - drop downs and keyed in text. The user expanded the panel and could enter additional options and search; then they could close it up after they were done. Worked great.

Now 2011 Vol 2 comes out and the WebPanel has been "retired". We're not in production yet...so I'd rather not carry a retired control into the new application. I found a suggested alternative which was the WebExplorerBar.

I'm working on the layout with the new control at the moment...and I can't figure out how to access the selected control value - i.e. a dropdown selected value or entered text - from the ItemTemplate. We're using C#, so any advice or examples would be great!

Thanks!!

 

 

Parents
No Data
Reply
  • 29417
    Verified Answer
    Offline posted

    Hello Jbristow ,

     

    Thank you for writing in our forum.

    If you need to access the values of the controls from the server side you could do it through the WebExplorerBar1.Groups[0].Items[0].FindControl(“controlId”) method.

     

    Ex.

            WebDropDown dd =(WebDropDown) WebExplorerBar1.Groups[0].Items[0].FindControl("WebDropDown1");

            string selectedValue = dd.SelectedItem.Text;

     

     

    I’m attaching a sample for your reference that accesses the controls nested in the WebExplorerBar  in the Page_Load event. Please refer to the sample and let me know if this is the behavior you’re after.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

Children