Unplanned
Last Updated: 19 Jun 2017 11:33 by ADMIN
ADMIN
Hristo
Created on: 12 Jun 2017 07:53
Category: GridView
Type: Bug Report
2
IMPROVE. RadGridView - months should be displayed with their names in the Excel-like RadListFilterPopup
Until released one can format the nodes this way:
private void RadGridView1_FilterPopupRequired(object sender, Telerik.WinControls.UI.FilterPopupRequiredEventArgs e)
{
    if (e.Column.GetType().Name == "GridViewDateTimeColumn")
    {
        RadListFilterPopup popup = new RadListFilterPopup(e.Column, true);
        e.FilterPopup = popup;
        popup.MenuTreeElement.TreeView.NodeFormatting += TreeView_NodeFormatting;
    }
}
 
int monthNumber = -1;
 
private void TreeView_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
    if (e.Node.Level == 2)
    {
        if (int.TryParse(e.Node.Text, out monthNumber))
        {
            e.NodeElement.ContentElement.Text = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(monthNumber);
        }
    }
}
0 comments