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

problem of tow ajax panel

3 Answers 63 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
haina
Top achievements
Rank 1
haina asked on 17 Jul 2008, 08:58 PM
Hi,
I am using the version released on 2008 May.
I have 2 controls one is Telerik Calendar the other one is Telerik Grid.
I set them into 2 ajax panel however the Calendar works fine, the telerick grid will fully post back when user click filter options. I change the Grid's ajax panle to Ajax manager, the first click is ok, second click will cause full postback, and  the third time work well again ... ...

It is so wired, any ideas
<table> 
    <tr> 
        <td> 
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" EnableAJAX="true">  
                <telerik:RadCalendar ID="RadCalendar1" runat="server" Font-Names="Arial, Verdana, Tahoma" 
                    ForeColor="Black" Style="border-color: #ececec" Skin="Web20" BorderStyle="Double" 
                    BorderWidth="5px" MultiViewColumns="2" BorderColor="#3366CC" AutoPostBack="True">  
                    <CalendarTableStyle BorderColor="White" BorderWidth="2px" Wrap="False" /> 
                </telerik:RadCalendar> 
            </telerik:RadAjaxPanel> 
        </td> 
        <td> 
            <telerik:RadAjaxManager ID="RadAjaxManager2" EnableAJAX="true" runat="server">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="gridDrivers">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="gridDrivers" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowSorting="True" 
                AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="gridDrivers_NeedDataSource" 
                Skin="Web20" Height="500px">  
                <ClientSettings AllowColumnsReorder="True" EnableRowHoverStyle="true" ReorderColumnsOnClient="True">  
                    <Selecting AllowRowSelect="True" /> 
                    <ClientEvents OnRowSelected="RowSelected" /> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                </ClientSettings> 
                <MasterTableView ClientDataKeyNames="DriverID" DataKeyNames="DriverID">  
                    <RowIndicatorColumn Visible="False">  
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn Resizable="False" Visible="False">  
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn AllowSorting="true" DataField="DriverID" HeaderText="Driver ID" 
                            SortExpression="DriverID" UniqueName="DriverID" DataType="System.String">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn AllowSorting="true" DataField="DriverName" HeaderText="Driver Name" 
                            SortExpression="DriverName" UniqueName="DriverName" DataType="System.String">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn AllowSorting="true" DataField="CompanyName" HeaderText="Company Name" 
                            SortExpression="CompanyName" UniqueName="CompanyName" DataType="System.String">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn AllowSorting="true" DataField="DivisionName" HeaderText="Division Name" 
                            SortExpression="DivisionName" UniqueName="DivisionName" DataType="System.String">  
                        </telerik:GridBoundColumn> 
                    </Columns> 
                    <EditFormSettings> 
                        <PopUpSettings ScrollBars="None" /> 
                    </EditFormSettings> 
                </MasterTableView> 
            </telerik:RadGrid> 
        </td> 
    </tr> 
</table> 

thank you

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 21 Jul 2008, 11:10 AM
Hello haina,

I followed your scenario in order to replicate the problem but no avail. Please find attached a sample project and try it on your end. Let me know if I missed something from your logic and what differs in your case.

Additionally you can find more information about RadAjaxPanel and RadAjaxManager in the following online resources:
http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html
http://www.telerik.com/help/aspnet-ajax/ajxajaxpanel.html

Let us know how it goes.

Kind regards,
Iana
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
haina
Top achievements
Rank 1
answered on 21 Jul 2008, 09:51 PM
Thank you so much.

I have RequiredFieldValidator on aspx file,  if I delet them it works well.

so if you change  the body part of AjaxManger.aspx file you send to me as below, you will find ajax works wired. However, this time I do not have to use RequireFiled Validator .

<body> 
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
    <div> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="gridDrivers">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gridDrivers" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="radDate">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="radDate" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <asp:TextBox ID="txtDriverID" CausesValidation="true" runat="server" Height="16px" 
            ValidationGroup="vgDriverDailyReport" Width="65px" BorderStyle="None" ForeColor="White" 
            BorderColor="White"></asp:TextBox> 
        <asp:TextBox ID="txtDates" CausesValidation="true" runat="server" Height="16px" ValidationGroup="vgDriverDailyReport" 
            Width="65px" BorderStyle="None" ForeColor="White" BorderColor="White"></asp:TextBox> 
        <asp:Label ID="lblErrorMessage" runat="server" ForeColor="Red"></asp:Label> 
        <asp:ValidationSummary ID="valSummary" runat="server" ValidationGroup="vgDriverDailyReport" /> 
        <label id="lblDriverMessage" runat="server" style="color: #FF0000" /> 
        <br /> 
        <label id="lblDatesMessage" style="color: #FF0000" runat="server" /> 
        <telerik:RadCalendar ID="radDate" runat="server" Font-Names="Arial, Verdana, Tahoma" 
            ForeColor="Black" Style="border-color: #ececec" Skin="Web20" BorderStyle="Double" 
            BorderWidth="5px" MultiViewColumns="2" BorderColor="#3366CC" AutoPostBack="True">  
            <CalendarTableStyle BorderColor="White" BorderWidth="2px" Wrap="False" /> 
        </telerik:RadCalendar> 
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Width="20px" 
            ControlToValidate="txtDates" ValidationGroup="vgDriverDailyReport" ErrorMessage="Report Date is required." 
            Text="*">   
        </asp:RequiredFieldValidator> 
        <telerik:RadGrid ID="gridDrivers" runat="server" DataSourceID="AccessDataSource1" 
            GridLines="None" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True">  
            <ClientSettings AllowColumnsReorder="True" EnableRowHoverStyle="true" ReorderColumnsOnClient="True">  
                <Selecting AllowRowSelect="True" /> 
                <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
            </ClientSettings> 
            <MasterTableView DataKeyNames="CustomerID" ClientDataKeyNames="CustomerID" DataSourceID="AccessDataSource1" 
                AutoGenerateColumns="False">  
                <Columns> 
                    <telerik:GridBoundColumn DataField="CustomerID" ReadOnly="True" HeaderText="CustomerID" 
                        SortExpression="CustomerID" UniqueName="CustomerID">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" 
                        UniqueName="CompanyName">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName" 
                        UniqueName="ContactName">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle" 
                        UniqueName="ContactTitle">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" 
                        UniqueName="City">  
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtDriverID" 
            ValidationGroup="vgDriverDailyReport" ErrorMessage="Driver ID is required.">*</asp:RequiredFieldValidator> 
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb" 
            SelectCommand="SELECT [CustomerID], [CompanyName], [ContactName], [ContactTitle], [City] FROM [Customers]">  
        </asp:AccessDataSource> 
    </div> 
    </form> 
</body> 
Thanks again

Haina
0
Iana Tsolova
Telerik team
answered on 22 Jul 2008, 09:18 AM
Hi haina,

I am glad to hear you have solved your problems.

Note that when using ASP Standard Validators with AJAX you need to set their EnableClientScripts property to false. You can find more information on that subject in this help topic.

Let us know if any issues arise.

Kind regards,
Iana
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
haina
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
haina
Top achievements
Rank 1
Share this question
or