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

Radcombo box width not set in Moss 2007 webpart coding

3 Answers 33 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
selva
Top achievements
Rank 1
selva asked on 07 Jul 2011, 05:41 AM
Hi !

I have used radcombo box in my custom webpart coding for moss 2007. And I have my own style sheet. The width of this control is not set.

How can I overwrite the radcombo  box default style sheet?

Environment details
----------------------------------------------
Windows 2003
Sharepoint 2007
IIS 6.0
Telerik 2010.3.1109.20


Can you tell me the correct way?

Thanks in advance.


3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Jul 2011, 06:29 AM
Hello Selva,

You can create your own skin for the RadComboBox. Take a look at the following documentation for more on this.
Tutorial: Creating a Custom Skin.

Also you can override the default style of RadControl by overriding the default CSS. Check out the following documentation for more on CSS file selectors.
CSS Skin File Selectors.

Thanks,
Shinu.
0
selva
Top achievements
Rank 1
answered on 07 Jul 2011, 09:29 AM
Hi
Thank you for your reply.

I tried, it doesn't work.  the details is as follows

Css Coding
----------------
.RadComboBox_MySkin *
{
  margin:0;
  padding:0;
}
.RadComboBox_MySkin
.RadComboBox_MySkin input
.RadComboDropDown_MySkin
{
  width:100%;   
}
Webpart Coding
-----------------------
RadComboBox TCBX_ToReceivers = new RadComboBox();
TCBX_ToReceivers.CssClass="RadComboBox_MySkin";

Even I tried TCBX_ToReceivers.Width=100; It is also not working.

Anything else I have missed. Please guide me.

Thanks in advance.



0
Dimitar Terziev
Telerik team
answered on 13 Jul 2011, 08:44 AM
Hello Selva,

Please try to set the EnableEmbeddedSkins="False" property of the RadComboBox, and also the Skin property to be "MySkin".

Also please verify what the styles are properly registered.

Regards,
Dimitar Terziev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ComboBox
Asked by
selva
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
selva
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or