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
315
WebExplorerBar issue setting group items css using server side events
posted

I am unable to set the css class properties for group items using server side events.  The code works fine for non-group items.  Attached is a sample application.  The sample demonstrates the issue.  The code also saves and restores the expanded/selected state of the WebExplorerBar items across page navigation.  The code that sets the styles attempts to set the style for the tree item that was selected (this works fine as long as it is not a group item) and also set the style of the group item if it is either the selected item or a sub-item of the group is selected.  If you inspect the markup that is generated you can see that the group items retain their default css style setting while regular items are set to their new styles.

Any help would be appreciated (sample app is attached).

Thanks.........

IG14TestControls_v14.1_groupstyles.zip
Parents
  • 10685
    Offline posted

    Hello, 

    Thank you for the code attachment.

    After investigating this matter for you, I suggest you to set the igeb_ prefix for the CSS classes applied, thus you will be using another set of inbuild css classes. For example make the following changes where required:

                        //group.ActiveCssClass = "webs_GroupActive";
                        //group.CssClass = "webs_Group";
                        //group.DisabledCssClass = "webs_GroupDisabled";
                        //group.HoverCssClass = "webs_GroupHover";
                        //group.SelectedCssClass = "webs_GroupSelected"; 

                        group.ActiveCssClass = "igeb_GroupActive";
                        group.CssClass = "igeb_Group";
                        group.DisabledCssClass = "igeb_GroupDisabled";
                        group.HoverCssClass = "igeb_GroupHover";
                        group.SelectedCssClass = "igeb_GroupSelected"; 

    What is more, I am reattaching a modified sample including a regular WebExplorerBar for comparison. I have updated the default css (ig_explorerbar.css) file used by the control adding some funky background colors for some of the classes involved, in order to better illustrate which is applied where/when.

    I expect this will help you get on tracks.

    IG14TestControls_v14.1RE.zip
Reply Children