Combobox filter element not taking the correct theme

6 posts, 0 answers
  1. Sunil
    Sunil avatar
    231 posts
    Member since:
    Jan 2004

    Posted 28 Oct 2010 Link to this post

    I have a grid whose theme is set to 'Telerik' and filtering is enabled.
    When the grid is databound, the filter cell for radcombox column does not take the grid's theme 'Telerik'.
    Is there a way to set the theme for radcombobox in filter cell?
    I am using Q1 2008 SP1.

    Thanks
    Sunil
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 28 Oct 2010 Link to this post

    Hello Sunil,

    By default you cannot do it like that, and again because you are using an older version i can just try to give you some of the ideas i would try to solve this:
    The easiest way would be to use Visual Style Builder and define the style for the ComboBoxElement from there.

    Please let me know if this a good option for you, if not, i will try to find some other solutions, because the elements inherit the theme from the parent control and i don't think you want to use a different theme for the grid than the rest of the application...

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

    Best Regards,
    Emanuel Varga
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sunil
    Sunil avatar
    231 posts
    Member since:
    Jan 2004

    Posted 29 Oct 2010 Link to this post

    Hi Emanuel,

    My problem is a bit strange.
    • When I bind the grid, and go straight to a combobox column filter, then I see a combobox filter that is NOT themed. Look at the attached image 'RadComboBoxThemingIssue.PNG' to see how the filter combobox looks at this point of time.
    •  But, if I go to a combobox cell in any of the datarows,  expand the combobox in that cell, and then go to a combobox filter at top, then the theme is applied correctly to the filter combobox, which you can see in attached image 'RadComboElementTheming.PNG'.

    So it seems that the theme is not getting applied to filter radcombobox till the user opens a combobox in one of the data cells.
    I will wait for your answer.

    Thanks
    Sunil
  5. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 29 Oct 2010 Link to this post

    Hello again Sunil,

    To start with, there are a few things you can try.
    The first thing that I've seen in a lot of suggestions from telerik regarding the late initialization load of elements would be to call:
    Application.DoEvents();
    But honestly i never had to much success with it.

    Another thing you can try is to handle the CellFormatting event and try to force a PerformLayout event, like so:
    void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
    {
        if (radGridView1.ActiveEditor is RadComboBoxEditor)
        {
            var comboEditor = radGridView1.ActiveEditor as RadComboBoxEditor;
            var comboEditorElement = comboEditor.EditorElement as RadComboBoxEditorElement;
            comboEditorElement.PerformLayoutCore(comboEditorElement);
            comboEditorElement.PerformLayout();
        }
    }

    Again, sorry i can just guess...

    Best Regards,
    Emanuel Varga
  6. Sunil
    Sunil avatar
    231 posts
    Member since:
    Jan 2004

    Posted 29 Oct 2010 Link to this post

    Hi Emanuel,

    In Q1 2008SP1, there is a ListBoxElement and no ComboBoxElement. I tried with ListBoxElement, but it did not solve the theming problem.
    I tried calling Application.DoEvents after databinding is complete but again. it did not do anything.

    Thanks
    Sunil
  7. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 02 Nov 2010 Link to this post

    Hello Sunil,

    As we mentioned in the ticket that you have opened for the same topic, the described behavior is an issue of Q1 2008 SP1 and it cannot be worked around. You need to update to our latest version. If you have any issues during the transition process, we will be glad to help. We are also ready to do all the necessary changes for you.

    If you have any further questions, please do not hesitate to write back.

    Kind regards,
    Jack
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready