This is a migrated thread and some comments may be shown as answers.

Hiding separators in RadGrid HeaderContextMenu

3 Answers 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Evers
Top achievements
Rank 2
Paul Evers asked on 18 May 2012, 08:14 AM
Hi,

I have a RadGrid (version Q1 2012) in which I hide some items in the headercontextmenu :

protected void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
        {
            switch (e.Item.Value)
            {
                case "GroupBy":
                case "UnGroupBy":
                case "bottomGroupSeperator":
                case "BestFit":
                case "bestFitSeparator":
                case "ColumnsContainer":
                case "filterMenuSeparator":
                    e.Item.Attributes.Add("style", "display: none");
                    break;
                default:
                    break;
            }
        }


The items are hidden except for the separators I want to hide. The result I see is four separators in stead of one.
How can I hide these separators?

Paul

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 May 2012, 11:25 AM
Hi,

Try the following CSS to hide the Separator.

CSS:
.RadMenu .rmSeparator, .RadMenu .rmSeparator:after
{
    height:0px !important;
}

Thanks,
Princy.
0
Paul Evers
Top achievements
Rank 2
answered on 18 May 2012, 01:07 PM
I don't want to hide all the separators. I only want to hide 3 out of four to hide.

Paul
0
Accepted
Princy
Top achievements
Rank 2
answered on 21 May 2012, 06:51 AM
Hello Paul,

Try setting the following CSS.
CSS:
.RadMenu .rmSeparator, .RadMenu .rmSeparator:after
{
    height:1px !important;
    margin-top:-2px !important;
    overflow:visible !important;
}

Thanks,
Princy.
Tags
Grid
Asked by
Paul Evers
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Paul Evers
Top achievements
Rank 2
Share this question
or