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

different sizing for radcombobox for mobile & desktop

3 Answers 129 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Henry
Top achievements
Rank 1
Henry asked on 25 May 2015, 05:18 PM

I have a radcombobox in my page (using Skin="WebBlue").

The page has loaded with different css style based on if it is rendered on mobile or desktop(style.css & stylemobile.css)

Now what I want to do is set different size property for the radcombobox: Height,Width and DropDownWidth etc. How do I overwrite it with css in different file? or is there any better solution?

I used table in HeaderTemplate and ItemTemplate, is it possible to use different width for cells based on mobile/desktop?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 28 May 2015, 08:22 AM
Hi,

For easier RadComboBox styles customization, I would recommend you to set the RenderMode property of all RadComboBoxes to Lightweight. You can change control's width and dropdown height with the following CSS selectors:

<style type="text/css">
    html .RadComboBox {
        width: 500px !important;
    }
 
    html .RadComboBoxDropDown {
        height: 100px;                
    }
</style>


And as far as RadGrid customization for desktop and mobile browsers is concerned, I would suggest you to take a look at the RadGrid adaptive behavior. Browsing the demo on a mobile device would show you the RadGrid Mobile rendering, tailored for touchscreen mobile devices. For further reference, you may review the Adaptive RadGrid help articles and online demos.

Regards,
Dimitar
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Henry
Top achievements
Rank 1
answered on 29 May 2015, 05:13 PM

Thanks for the response. This works, however it applies to all radcombox, is it possible to specify different sizing for different combobox? 

 

0
Magdalena
Telerik team
answered on 02 Jun 2015, 09:55 AM
Hi Henry,

You can set a custom CSS class to a RadComboBox and its drop-down by the properties: 
DropDownCssClass and CssClass
<telerik:RadComboBox runat="server" CssClass="customClass" DropDownCssClass="customClass" />

Then the selectors will be
html .RadComboBox.customClass {
    width: 500px !important;
}
  
html .RadComboBoxDropDown.customClass {
    height: 100px;
}

Do not hesitate to contact us if you have other questions.

Regards,
Magdalena
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
ComboBox
Asked by
Henry
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Henry
Top achievements
Rank 1
Magdalena
Telerik team
Share this question
or