Search

Showing posts with label RadControls. Show all posts
Showing posts with label RadControls. Show all posts

Jun 14, 2010

RadComboBox dropdown issue in IE

Hello All, I was facing issue with RadComboBox dropdown, its adding scrollbar in IE if an item is longer then default size.

image

This is normal behavior, as we have item which get fits into dropdown, now consider following case where we items which are little longer then before.

image

Here you can see horizontal scrollbar is appear as our text is little bit longer then min-width property. Min-width property allow you to set minimum width of dropdown. But this looks weird.

Solution: You need to override following default style of RadComboBox.

<style>
.rcbSlide div
{
width: auto !important;
min-width: 150px !important;
max-width: 400px !important;
}
.rcbList
{
position: relative !important;
}
</style>

We can see after applying this style into page, RadComboBox will look like following.

image

Dec 2, 2008

RadGridNamespace is undefined

I got error RadGridNamespace is undefined while working with RadGrid and Themes all to gather.

Problem was, It was not able to find the scripts and related files form Themes folder. The default path for Script and Theme for Rad controls are fixed and which is under /RadControls. It goes to that directory but its obvious and convention says that if we are using Themes and Skins we put all the scripts, images and skins in App_Themes folder.

So we need to override the default Rad control default path property RadControlsDir in OnInit method

protected override void OnInit(EventArgs e)
{
rgTest.RadControlsDir = string.Format("~/App_Themes/{0}/RadControls/", this.Page.Theme);
}

Note: If you are having multiple RadGrid on same page, then you have to set property RadControlsDir for all the grids in OnInit method.

Sep 3, 2008

Creating Rad Menu using LINQ

Hello all,

I created sample code to generate Dynamic RadMenu with use of LINQ. The controls like RadMenu, AspMenu which accept XML as the datasource to generate the output.

I use LINQ to generate XML, you can read here to generate XML using LINQ.

You can find the simple project at Code Project. You can modify the code with your use, its dynamically creates the node also it uses the recursion to generate n level menu item.