3 Answers, 1 is accepted
0
Hi Rory,
You could handle on ItemDataBound/ItemCreated event, retrieve a reference to the RadComboBox inside GridFilteringItem and set the properties you need. The following example illustrates how you can change the height of the combo box:
I hope this helps.
Greetings,
Pavlina
the Telerik team
You could handle on ItemDataBound/ItemCreated event, retrieve a reference to the RadComboBox inside GridFilteringItem and set the properties you need. The following example illustrates how you can change the height of the combo box:
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridFilteringItem)
{
GridFilteringItem filteringItem = e.Item
as
GridFilteringItem;
RadComboBox combo = (RadComboBox)filteringItem.FindControl(
"RadComboBox1"
);
combo.Height = Unit.Pixel(100);
}
}
I hope this helps.
Greetings,
Pavlina
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
0
Rory
Top achievements
Rank 1
answered on 24 Aug 2010, 07:09 PM
Hi Pavlina,
This code doesn't seem to work. The control "RadComboBox1" is never found. Does this code not work when the Context Menu Header Filter Items are enabled? It seems like the ComboBox would be part of the ContextMenu that is showing on Right Click rather than inside a grid filtering item.
Thanks.
This code doesn't seem to work. The control "RadComboBox1" is never found. Does this code not work when the Context Menu Header Filter Items are enabled? It seems like the ComboBox would be part of the ContextMenu that is showing on Right Click rather than inside a grid filtering item.
Thanks.
0
Rory
Top achievements
Rank 1
answered on 24 Aug 2010, 10:46 PM
Found the Answer. Pasted below. Thanks your code at least got me on the right track.
OnInit(EventArgs e)
{
grid.HeaderContextMenu.ItemCreated += new RadMenuEventHandler(HeaderContextMenu_ItemCreated_SimsBasePage);
}
public void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
{
if(e.Item.Value == "FilterMenuContainer")
{
RadComboBox combo = (RadComboBox)e.Item.FindControl("HCFMRCMBFirstCond");
if (combo != null)
{
combo.Height = Unit.Pixel(500);
}
RadComboBox combo2 = (RadComboBox)e.Item.FindControl("HCFMRCMBSecondCond");
if (combo2 != null)
{
combo2.Height = Unit.Pixel(500);
}
}
}