Hi all
I have a RadComboBox placed inside the PagerTemplate of RadGrid
<PagerTemplate>
<br /><br />
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left">
Selected:
<telerik:RadComboBox ID="ActionBox" SkinID="NotFixed" runat="server">
<Items>
<telerik:RadComboBoxItem Text="Delete" Value="1" />
<telerik:RadComboBoxItem Text="Mark as Read" Value="2" />
<telerik:RadComboBoxItem Text="Add to Black List" Value="3" />
</Items>
</telerik:RadComboBox>
<asp:Button ID="GoBtn" CssClass="SmallGreenBtn" OnClick="ActionGo_Clicked" runat="server" Text="Go" />
</td>
<td align="right">
<asp:Panel runat="server" HorizontalAlign="Right" ID="NumericPagerPlaceHolder"></asp:Panel>
</td>
</tr>
</table>
</PagerTemplate>
And a button GoBtn which fires click event, I am getting the ComboBox from Pager using the following method
private RadComboBox GetActionBox()
{
GridItem pagerItem = InboxGrid.MasterTableView.GetItems(GridItemType.Pager)[0];
RadComboBox ActionBox = (RadComboBox) pagerItem.FindControl("ActionBox");
return ActionBox;
}
It successfully finds the Combo but the selected value is always the first item's value in the Combo, I am stack with this and cannot move forward , any help is much appreciated.
I also fire OnItemDataBound event to add the numeric pager, (just for more info)
if (e.Item is GridPagerItem)
{
GridPagerItem gridPager = e.Item as GridPagerItem;
Control numericPagerControl = gridPager.GetNumericPager();
Control placeHolder = gridPager.FindControl("NumericPagerPlaceHolder");
placeHolder.Controls.Add(numericPagerControl);
}
Data binding is done during the page load inside if(!IsPostBack)
I have a RadComboBox placed inside the PagerTemplate of RadGrid
<PagerTemplate>
<br /><br />
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left">
Selected:
<telerik:RadComboBox ID="ActionBox" SkinID="NotFixed" runat="server">
<Items>
<telerik:RadComboBoxItem Text="Delete" Value="1" />
<telerik:RadComboBoxItem Text="Mark as Read" Value="2" />
<telerik:RadComboBoxItem Text="Add to Black List" Value="3" />
</Items>
</telerik:RadComboBox>
<asp:Button ID="GoBtn" CssClass="SmallGreenBtn" OnClick="ActionGo_Clicked" runat="server" Text="Go" />
</td>
<td align="right">
<asp:Panel runat="server" HorizontalAlign="Right" ID="NumericPagerPlaceHolder"></asp:Panel>
</td>
</tr>
</table>
</PagerTemplate>
And a button GoBtn which fires click event, I am getting the ComboBox from Pager using the following method
private RadComboBox GetActionBox()
{
GridItem pagerItem = InboxGrid.MasterTableView.GetItems(GridItemType.Pager)[0];
RadComboBox ActionBox = (RadComboBox) pagerItem.FindControl("ActionBox");
return ActionBox;
}
It successfully finds the Combo but the selected value is always the first item's value in the Combo, I am stack with this and cannot move forward , any help is much appreciated.
I also fire OnItemDataBound event to add the numeric pager, (just for more info)
if (e.Item is GridPagerItem)
{
GridPagerItem gridPager = e.Item as GridPagerItem;
Control numericPagerControl = gridPager.GetNumericPager();
Control placeHolder = gridPager.FindControl("NumericPagerPlaceHolder");
placeHolder.Controls.Add(numericPagerControl);
}
Data binding is done during the page load inside if(!IsPostBack)