Filter Form Font & Bold

Originally Posted 7 May 2017, 3:45 pm EST

  • Originally Posted 7 May 2017, 3:45 pm EST

    Hi,

    I'm using C1.Win.C1FlexGrid.4 version 4.0.20163.226

    3 Questions about the Filter:
    1. How can i set the font used in the List Filter?
    2. How can i 'Turn-Off' Font Bold for items in the list?
    3. How can i set [u]Horizontal Scroll[/u] position of the list to 0?

    Thanks,
    Guy
  • Reply

    Hi Guy,

    I am discussing the requirement with the development team (internal tracking ID: 257515). Will get back to you once there is any information from them.

    Thanks,
    Pragati
  • Reply

    Hi,

    Where can i set / change / control these new settings?

    @Roshtov said:
    3 Questions about the Filter:
    1. How can i set the font used in the List Filter?
    2. How can i 'Turn-Off' Font Bold for items in the list?
    3. How can i set [u]Horizontal Scroll[/u] position of the list to 0?
  • Reply

    Hi Pragati,

    Any News?

    Guy.
  • Reply

    Hi Guy,

    This will be fixed in 2017 v2 release, scheduled for mid of July, 2017.

    Thanks,
    Pragati
  • Reply

    Hi,

    The issue has been fixed in the latest release build, which you may download from the following URL:
    http://prerelease.componentone.com/dotnet40/c1winforms/2017-t2/C1WinForms.4_4.0.20172.271.zip
    http://prerelease.componentone.com/dotnet20/c1winforms/2017-t2/C1WinForms.2_2.0.20172.271.zip

    Thanks,
    Ruchir Agarwal
  • Marked as Answer

    Reply

    Hi,

    The requirements can be met using the below code snippet:


    var list = frm.Controls[1].Controls[1].Controls[0];
    list.GetType().GetProperty("BoldCheckedItems").SetValue(list, false);
    list.Font = new Font(list.Font, FontStyle.Italic);
    SetScrollPos(list.Handle, Orientation.Horizontal, 0, true);


    A sample has been attached for your reference.

    Regards,
    Esha
    2017/07/Prj_FilterEditorForm.zip
  • Reply

    Dear Esha,

    Unfortunately this solution work partially...
    1. It only affects when (
    Column.AllowFiltering = AllowFiltering.Default
    ) and not when (
    Column.AllowFiltering = AllowFiltering.ByValue
    )
    2. ScrollPosition is not set correctly when (
    RightToLeft = RightToLeft.Yes
    )
    3. Font only affects "Select All" value...

    Please advise on how to fix this.
    Thank you,
    Guy.
  • Reply

    Hi,

    1. In order to handle both situations, you can make the following change to the suggested code:
    try
    {
    list = frm.Controls[1].Controls[1].Controls[0];
    }
    catch
    {
    list = frm.Controls[1].Controls[0];
    }

    You can also refer to the attached sample, demonstrating the same.

    2. This is in discussion with the developers. I will inform you once there is any information from them.

    3. Please note that you can set font for list box items on filter editor form as suggested earlier. This font remains the same for selected/deselected items (as shown in the attached image).

    Could you please let me know if you are facing issue with this or is there any other issue?

    Regards,
    Meenakshi
    2017/08/Prj_FilterEditorFormMod.zip


  • Reply

    > 2. ScrollPosition is not set correctly when (RightToLeft = RightToLeft.Yes)

    You can use WinAPI SendMessage function instead of SetScrollPos in this scenario.
    SendMessage(list.Handle, (int)WM.HSCROLL, (IntPtr)ScrollBarCommands.SB_RIGHT, IntPtr.Zero);


    Attached is the sample for your reference.

    - Meenakshi
    2017/09/Prj_FilterEditorFormScroll_RtoL.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels