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

Combobox filter element not taking the correct theme

5 Answers 128 Views
GridView
This is a migrated thread and some comments may be shown as answers.
SUNIL
Top achievements
Rank 2
Iron
SUNIL asked on 28 Oct 2010, 06:04 PM
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

5 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 28 Oct 2010, 10:34 PM
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
0
SUNIL
Top achievements
Rank 2
Iron
answered on 29 Oct 2010, 06:07 AM
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
0
Emanuel Varga
Top achievements
Rank 1
answered on 29 Oct 2010, 08:31 AM
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
0
SUNIL
Top achievements
Rank 2
Iron
answered on 29 Oct 2010, 02:59 PM
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
0
Jack
Telerik team
answered on 02 Nov 2010, 05:48 PM
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
Tags
GridView
Asked by
SUNIL
Top achievements
Rank 2
Iron
Answers by
Emanuel Varga
Top achievements
Rank 1
SUNIL
Top achievements
Rank 2
Iron
Jack
Telerik team
Share this question
or