Hi ,
I have create one custom skin for radgrid .....
For page size Combo box i am facing a problem. when i click on page size dropdown it's shows me transpernt background.
Items doesn't show proper please check attach file. I want set backgroung of items .so containtent of item can show properly.
I have create one custom skin for radgrid .....
For page size Combo box i am facing a problem. when i click on page size dropdown it's shows me transpernt background.
Items doesn't show proper please check attach file. I want set backgroung of items .so containtent of item can show properly.
5 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 04 Mar 2011, 10:54 AM
Hello Moksha,
In order to make the RadComboBox in the RadGrid pager display correctly, you need to register a custom skin for it, just like you have registered a custom skin for the RadGrid. The skin name must be the same as the RadGrid skin's name.
C#:
Thanks,
Princy.
In order to make the RadComboBox in the RadGrid pager display correctly, you need to register a custom skin for it, just like you have registered a custom skin for the RadGrid. The skin name must be the same as the RadGrid skin's name.
C#:
protected
void
RadGrid1_ItemCreated(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridPagerItem)
{
GridPagerItem pager = (GridPagerItem)e.Item;
((e.Item
as
GridPagerItem).FindControl(
"PageSizeComboBox"
)
as
RadComboBox).Skin =
"Vista"
;
}
}
Thanks,
Princy.
0

Moksha
Top achievements
Rank 1
answered on 07 Mar 2011, 09:53 AM
Thanks Princy,
But i want css class name....for page size combo... becuase i am creating my custom skin.
But i want css class name....for page size combo... becuase i am creating my custom skin.
0

Princy
Top achievements
Rank 2
answered on 07 Mar 2011, 10:18 AM
Hello Moksha,
If you want to set backgroud color for ComboBox items using CSS, add the following styles to your page.
CSS:
Thanks,
Princy.
If you want to set backgroud color for ComboBox items using CSS, add the following styles to your page.
CSS:
<style type=
"text/css"
>
.RadComboBoxDropDown_YourSkinName
{
background-color
: Red
!important
;
}
</style>
Thanks,
Princy.
0

Moksha
Top achievements
Rank 1
answered on 07 Mar 2011, 11:50 AM
This is not working for background of items List of page combo....(I.e backgroung of item in list 10,20,30)
0

Princy
Top achievements
Rank 2
answered on 08 Mar 2011, 10:55 AM
Hello Moksha,
Have you set your custom skin name here(
Java Script:
Thanks,
Princy.
Have you set your custom skin name here(
.RadComboBoxDropDown_YourSkinName
)? You can also set its background color from client side in 'OnClientDropDownOpening' event of RadComboBox.protected
void
RadGrid1_ItemCreated(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridPagerItem)
{
GridPagerItem pager = (GridPagerItem)e.Item;
RadComboBox PageSizeComboBox = (RadComboBox)pager.FindControl(
"PageSizeComboBox"
);
PageSizeComboBox.OnClientDropDownOpening =
"OnClientItemsRequestedHandler"
;
}
}
Java Script:
<script type=
"text/javascript"
>
function
OnClientItemsRequestedHandler(sender, eventArgs) {
var
dropDownDiv = sender.get_dropDownElement();
dropDownDiv.style.backgroundColor =
"red"
;
}
</script>
Thanks,
Princy.