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

Making Filter context menu right to left

5 Answers 108 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tooraj
Top achievements
Rank 1
Tooraj asked on 06 Mar 2011, 08:49 AM
Hi,
I want to make contextmenu of filterbutton of my grid right to left. menu's left vertical colorized bar also must be appeared at right.
please guide me.

5 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 06 Mar 2011, 05:09 PM
Hello,

you can change the filter context menu RighttoLeft in the following way

private void radGridView1_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
    if (e.ContextMenuProvider == null)
    {
        e.ContextMenu.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
    }
}

Hope that helps
Richard
0
Tooraj
Top achievements
Rank 1
answered on 08 Mar 2011, 10:21 AM
Hello,
Unfortunately the context menu still apears left to right. there is a veritcal bar at the left of the context menu and I want to show both menu text and vertical bar at right side not left.
0
Richard Slade
Top achievements
Rank 2
answered on 08 Mar 2011, 10:23 AM
Hello,

By the middle of this month, the new Q1 2011 release is due out. This has many exciting new features, but one of the enhancements is an overhaul of the LeftToRight support.
Hope this helps
Richard
0
Emanuel Varga
Top achievements
Rank 1
answered on 08 Mar 2011, 11:32 AM
Hello Tooraj,

Just change Richards code to this to achieve the desired behavior:
void radGridView1_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
    if (e.ContextMenu == null)
    {
        return;
    }
 
    e.ContextMenu.RightToLeft = RightToLeft.Yes;
}

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
Telerik WinForms MVP

0
Ivan Todorov
Telerik team
answered on 10 Mar 2011, 04:24 PM
Hi Tooraj,

Emanuel's suggestion should work fine for you and as Richard mentioned, as of Q1 2011 the Right-to-Left functionality will be improved and you will not have to bother setting this manually.

Greetings,
Ivan Todorov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Tooraj
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Tooraj
Top achievements
Rank 1
Emanuel Varga
Top achievements
Rank 1
Ivan Todorov
Telerik team
Share this question
or