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
20
How to hide a group item using ultraweblistbar control
posted

Hi,

   How to hide a group item using ultraweblistbar control. Guide me on this.

  Thanks & Regards.

 

Parents
No Data
Reply
  • 5118
    posted

    Hello,

    On the Client do this:

    <script id="igClientScript" type="text/javascript">

    <!--

    function WebImageButton2_Click(oButton, oEvent){

        // hide item on client

        if (myListBar.Groups[1].Items[1].Key == "HideMeOnClient"){

        myListBar.Groups[1].Items[1].Element.style.display = 'none';

        }

    }

    var myListBar;

    function UltraWebListbar1_InitializeListbar(oListbar, oEvent){

        myListBar = oListbar;

    }

    // -->

    </script>

    Since there is no SetVisible method for an Item we have to do it that way on the client.

    On the Server do this:

    protected void WebImageButton1_Click(object sender, Infragistics.WebUI.WebDataInput.ButtonEventArgs e)

    {

    this.UltraWebListbar1.Groups.FromKey("Group2").Items.FromKey("HideMeOnServer").DefaultStyle.Height = Unit.Pixel(0);

    this.UltraWebListbar1.Groups.FromKey("Group2").Items.FromKey("HideMeOnServer").DefaultStyle.Width = Unit.Pixel(0);

    }

Children