10 Answers, 1 is accepted
0
Hello Ali,
You can do that in the ContextMenuOpening event:
More information about the context menu in RadGridView is available here: http://www.telerik.com/help/winforms/gridview-context-menus-modifying-the-default-context-menu.html.
I hope this helps.
Greetings,
Stefan
the Telerik team
You can do that in the ContextMenuOpening event:
void
radGridView1_ContextMenuOpening(
object
sender, ContextMenuOpeningEventArgs e)
{
e.ContextMenu.Font =
new
Font(
"Arial"
, 11);
}
More information about the context menu in RadGridView is available here: http://www.telerik.com/help/winforms/gridview-context-menus-modifying-the-default-context-menu.html.
I hope this helps.
Greetings,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more.
Join us for a FREE webinar to see all the new stuff in action.
Interested, but can’t attend? Register anyway and we’ll send you the recording.
Interested, but can’t attend? Register anyway and we’ll send you the recording.
0
Ali
Top achievements
Rank 1
answered on 01 Mar 2013, 03:09 PM
Thank you
Good luck
Good luck
0
0
Hi Ali,
Thank you for writing back.
One way to do that is to handle the popup initialization and set the font of the menu items and the popup. In the case of RadListFilterPopup, which contains RadTreeView, you will have to subscribe to its NodeFormatting event in order to change the appearance of the nodes:
Off topic, I would like to kindly ask you to separate the questions that are not related to each other in separate threads, as this will make it easier for the community to find their answers.
Kind regards,
Stefan
the Telerik team
Thank you for writing back.
One way to do that is to handle the popup initialization and set the font of the menu items and the popup. In the case of RadListFilterPopup, which contains RadTreeView, you will have to subscribe to its NodeFormatting event in order to change the appearance of the nodes:
Font f =
new
Font(
"Arial"
, 11);
void
radGridView1_FilterPopupInitialized(
object
sender, FilterPopupInitializedEventArgs e)
{
BaseFilterPopup popup = (BaseFilterPopup)e.FilterPopup;
SetMenuFont(popup.Items);
popup.Font = f;
if
(e.FilterPopup
is
RadListFilterPopup)
{
RadListFilterPopup listFilterPopup = (RadListFilterPopup)e.FilterPopup;
listFilterPopup.MenuTreeElement.TreeView.NodeFormatting -= TreeView_NodeFormatting;
listFilterPopup.MenuTreeElement.TreeView.NodeFormatting += TreeView_NodeFormatting;
}
}
void
TreeView_NodeFormatting(
object
sender, TreeNodeFormattingEventArgs e)
{
e.Node.Font = f;
}
Off topic, I would like to kindly ask you to separate the questions that are not related to each other in separate threads, as this will make it easier for the community to find their answers.
Kind regards,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more.
Check out all of the latest highlights.
0
Ali
Top achievements
Rank 1
answered on 07 Mar 2013, 08:33 AM
thanks
I am using Telerik 2011 Q3 SP1 version of events does not FilterPopupInitialized
Can I solve my problem with this version
I am using Telerik 2011 Q3 SP1 version of events does not FilterPopupInitialized
Can I solve my problem with this version
0
mohammad
Top achievements
Rank 1
answered on 09 Mar 2013, 10:01 AM
I have the same problem.
version telerik Q3 2011 sp1
version telerik Q3 2011 sp1
0
Hi guys,
In your version you can use the FilterPopupRequired event to access the filter popup. Here is a sample:
I hope this helps.
Greetings,
Stefan
the Telerik team
In your version you can use the FilterPopupRequired event to access the filter popup. Here is a sample:
Font f =
new
Font(
"Arial"
, 11);
void
radGridView1_FilterPopupRequired(
object
sender, FilterPopupRequiredEventArgs e)
{
BaseFilterPopup popup = (BaseFilterPopup)e.FilterPopup;
SetMenuFont(popup.Items);
popup.Font = f;
if
(e.FilterPopup
is
RadListFilterPopup)
{
RadTreeView tree = (RadTreeView)popup.Controls[1];
tree.NodeFormatting -= TreeView_NodeFormatting;
tree.NodeFormatting += TreeView_NodeFormatting;
}
}
private
void
SetMenuFont(Telerik.WinControls.RadItemOwnerCollection radItemOwnerCollection)
{
foreach
(RadMenuItemBase item
in
radItemOwnerCollection)
{
item.Font = f;
if
(item.HasChildren)
{
SetMenuFont(item.Items);
}
}
}
I hope this helps.
Greetings,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more.
Check out all of the latest highlights.
0
0
mohammad
Top achievements
Rank 1
answered on 14 Mar 2013, 10:30 AM
But I want to change the font of all parts radgridview
Do you want to change the font of all parts radgridview
Do you want to change the font of all parts radgridview
0
Hello Mohammad,
I would suggest that you open a new thread and address your questions there, so we do not mix the subjects. This thread is named "Change the font menu in radgridview", so lets keep it for the font of the menus.
Additionally, you can check out how to use the forums here: http://www.telerik.com/community/forums/winforms/gridview/important-information-on-using-the-telerik-forums.aspx.
Greetings,
Stefan
the Telerik team
I would suggest that you open a new thread and address your questions there, so we do not mix the subjects. This thread is named "Change the font menu in radgridview", so lets keep it for the font of the menus.
Additionally, you can check out how to use the forums here: http://www.telerik.com/community/forums/winforms/gridview/important-information-on-using-the-telerik-forums.aspx.
Greetings,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more.
Check out all of the latest highlights.