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
405
using ItemBound event to store additional data per item in WebExplorerBar for dynamic navigation
posted

Hi,  I am binding WebExplorerBar control to xml and in ItemBound event I would like to access the dataItem object to get all the attributes for the xml element and store them as Json string in "value" field for the item. when user clicks on an item, I would like to get that data and then decide which page the user should navigate to, dynamically. Please let me know.

Thanks,

Rama

Parents
  • 3726
    posted

    Hi Rama,

    take a look at the data binding sample located here: http://samples.infragistics.com/2010.3/WebFeatureBrowser/srcview.aspx?path=WebExplorerBar/WebExplorerBarDataBinding.src&file=WebExplorerBarDataBinding.aspx&font=3

    You have to specify explorer bar item bindings so that XML data goes to the right explorer bar item field.

    On the client side you have to subscribe for ItemClick:

    <ClientEvents ItemClick="ItemClickHandler" />

    and you can do the following:

    function ItemClickHandler(sender, args) {
         var value =  args.getExplorerBarItem().get_value();

         var object = eval(value); // evals the JSON string you have built

         window.open(object.navigateUrl, '_blank'); // opens the desired URL in a new window, check the JS API for window.open().
    }

    Hope this helps.

    Thanks,

    Lubomir

Reply Children
No Data