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

radButton inside radAjaxPanel not working

1 Answer 99 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 2
Doug asked on 16 May 2013, 04:15 PM
Hi I am relatively new to Ajax so bear with me.  I have an RadAjaxPanel on my page.  inside the radajaxpanel i have two dropdown list, calender and a button.  The button is not firing.  However, when i move the radbutton outside of the radajaxpanel it works just fine.  Please help........... how do i get the radbutton inside the radajaxpanel to work.  Code is below..... btnViewReport is the one not working

                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="188px" 
                    style="margin-top: 0px" width="568px">
                    <telerik:RadComboBox ID="cbxRecipe" Runat="server" DataSourceID="dsRecipe" 
                   Height="600px" Width="250px" EnableLoadOnDemand="true"
                            DropDownWidth="249px" 
    EmptyMessage="Select a Recipe" HighlightTemplatedItems="true"
                 EnableAutomaticLoadOnDemand="True" 
                    DataTextField="RecipeCode" DataValueField="RecipeCode" 
                    AutoPostBack="True"  >
                        <HeaderTemplate>
                            <table style="width: 249px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 40px;">
                                        Recipe</td>
                                    <td style="width: 149px;">
                                        Description</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table style="width: 249px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 40px;">
                                        <%# DataBinder.Eval(Container.DataItem, "RecipeCode")%>
                                    </td>
                                    <td style="width: 149px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Recipe")%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="dsRecipe" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:oCon_Riverside %>" SelectCommand="select RecipeCode, Recipe
from [dbo].[CCFIProduction_recipe]
Order by RecipeCode "></asp:SqlDataSource>
                    <br />
                    <br />
                    <telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="True" 
                        DataSourceID="dsGetUBI" DataTextField="UBI" DataValueField="UBI" 
                        DropDownWidth="298px" EmptyMessage="Select a UBI" Enabled="False" 
                        Height="600px" HighlightTemplatedItems="True" ShowDropDownOnTextboxClick="True" 
                        Width="300px">
                        <HeaderTemplate>
                            <table cellpadding="0" cellspacing="0" style="width: 298px">
                                <tr>
                                    <td style="width: 40px;">
                                        Recipe</td>
                                    <td style="width: 60px;">
                                        PackingDate</td>
                                    <td style="width: 80px;">
                                        MakingBatch</td>
                                    <td style="width: 60px;">
                                        UBI</td>
                                    <td style="width: 20px;">
                                        Shift</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table cellpadding="0" cellspacing="0" style="width: 298px">
                                <tr>
                                    <td style="width: 40px;">
                                        <%# DataBinder.Eval(Container.DataItem, "RecipeCode")%>
                                    </td>
                                    <td style="width: 60px;">
                                        <%# DataBinder.Eval(Container.DataItem, "PackingDate")%>
                                    </td>
                                    <td style="width: 80px;">
                                        <%# DataBinder.Eval(Container.DataItem, "MakingBatch")%>
                                    </td>
                                    <td style="width: 60px;">
                                        <%# DataBinder.Eval(Container.DataItem, "UBI")%>
                                    </td>
                                    <td style="width: 20px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Shift")%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="dsGetUBI" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:oCon_Riverside %>" 
                        
                        SelectCommand="SELECT recipe.RecipeCode, Packing.MakingBatch, CONVERT(varchar(20), Packing.PackingDate, 101) as PackingDate, Packing.SellByLetter, Packing.UBI, Packing.Shift FROM recipe INNER JOIN Packing ON recipe.RecipeCode = Packing.RecipeCode WHERE (Packing.PackingDate &gt; dateadd(yyyy,-1,GETDATE())) AND (recipe.RecipeCode = @recipeCode) AND (NOT (Packing.UBI IS NULL)) ORDER BY recipe.RecipeCode, Packing.PackingDate DESC, Packing.SellByLetter">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="cbxRecipe" Name="recipeCode" 
                                PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    <asp:Label ID="Label1" runat="server" Font-Size="Small" 
                        Text="*Last 12 months shown"></asp:Label>
                    <br />
                    <br />
                    <asp:Label ID="LblMkDate" runat="server" Text="Select Make Date:"></asp:Label>
                    <telerik:RadDatePicker ID="RadDatePicker1" Runat="server" AutoPostBack="True" 
                        Culture="en-US">
                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False">
                        </Calendar>
                        <DateInput AutoPostBack="True" DateFormat="M/d/yyyy" 
                            DisplayDateFormat="M/d/yyyy" LabelWidth="40%">
                        </DateInput>
                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                    </telerik:RadDatePicker>
                    <br />
                    <br />
                    <telerik:RadButton ID="btnViewReport" runat="server" Text="View Report" AutoPostBack="True">
                    </telerik:RadButton>
                </telerik:RadAjaxPanel>


thanks

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 21 May 2013, 05:12 PM
Hi Doug,

I used the provided code and prepared a sample project where the button inside RadAjaxPanel is working without problems. I am attaching the project for your reference. Give it a try and let me know what is the difference in your case.

All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
Doug
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Share this question
or