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

RadGrid Paging Buttons

6 Answers 199 Views
Grid
This is a migrated thread and some comments may be shown as answers.
BrianS
Top achievements
Rank 1
BrianS asked on 05 May 2011, 08:42 PM
I have one form with multiple RadWindows. Each RadWindow has a Radgrid. The grids settings are similar and each is added to an RadAjaxManger.

Grid 1 has it's next / previous buttons renders as follows:

<input name="AccountSearchControl$RadGridSearchResults$ctl01$ctl07$ctl03$ctl20" tabIndex="0" title="Next Page" class="rgPageNext" onclick="return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MainContentPlaceHolder$radWinAccountSearch$C$AccountSearchControl$RadGridSearchResults$ctl01$ctl07$ctl03$ctl20", "", true, "", "", false, true))" type="button" jQuery1304623369855="88" value=" "/>


Grid 2 has it's next / previous buttons renders as follows:

<input name="PayeeHistoryControl$RadGridPayeeHistory$ctl00$ctl03$ctl01$ctl12" title="Next Page" class="rgPageNext" type="submit" value=" "/>

Why does grid 2 render its button as a submit and grid 1 doesn't? This is causing the RadAjaxLoadingPanel to not appear for grid 2.

Here is grid 2 declaration:

<telerik:RadGrid ID="RadGridPayeeHistory" Skin="Telerik" AllowSorting="True" AllowPaging="True"
           AllowFilteringByColumn="True" AutoGenerateColumns="False" runat="server" GridLines="None"
           CssClass="radgrid" AllowMultiRowSelection="False" Width="100%" PageSize="50" EnableLinqExpressions="false"
           OnNeedDataSource="RadGridPayeeHistory_NeedDataSource"
           OnInit="RadGridPayeeHistory_Onit"   
           OnPreRender="RadGridPayeeHistory_PreRender"
           OnSortCommand="RadGridPayeeHistory_OnSortCommand" 
           OnItemCommand="RadGridPayeeHistory_OnItemCommand"                       
        >
           <MasterTableView AllowNaturalSort="false" CommandItemDisplay="Top" ClientDataKeyNames="DescriptionLineOne, ImportedPaymentMethod.PaymentDescLine3"
               DataKeyNames="DescriptionLineOne, DescriptionLineTwo, ImportedPaymentMethod.AddressLineOne, ImportedPaymentMethod.AddressLineTwo,
               ImportedPaymentMethod.City, ImportedPaymentMethod.State, ImportedPaymentMethod.Zip, ImportedPaymentMethod.PaymentDescLine1,
               ImportedPaymentMethod.PaymentDescLine2, ImportedPaymentMethod.PaymentDescLine3, ImportedPaymentMethod.AccountType">
               <SortExpressions>
                           <telerik:GridSortExpression FieldName="DescriptionLineOne" SortOrder="Ascending" />                           
               </SortExpressions>
               <CommandItemTemplate>
                   <div class="commandLeft">                                                   
                       <asp:Button ID="btnPHClearFilters" runat="server" Text="Clear Filters" OnClick="OnClearFiltersClick"></asp:Button>                                  
                   </div>                   
                   <div class="commandRight">                                                   
                       <span class="labelA">CMS History</span>
                   </div>       
               </CommandItemTemplate>
               <NoRecordsTemplate>
                   <span class="noRecords">No CMS history found for the Accounts.</span>
               </NoRecordsTemplate>
               <Columns>
            
           ...
                    
               </Columns>
           </MasterTableView>
           <PagerStyle AlwaysVisible="true" />
           <GroupingSettings CaseSensitive="False" />
           <ClientSettings EnableRowHoverStyle="true" EnableAlternatingItems="false">
               <Selecting AllowRowSelect="True" />
               <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" ScrollHeight="275px" />
           </ClientSettings>
       </telerik:RadGrid>

6 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 06 May 2011, 12:54 PM
Hi BrianS,

How is RadGrid 2 ajaxified? Where is it defined - in a separate page displayed by RadWindow or in the RadWindow ContentTemplate? Also, where is in this case defined the RadAjaxManager?

Regards,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
BrianS
Top achievements
Rank 1
answered on 06 May 2011, 01:42 PM

I have a master / detail site configuration. I have a RadAjaxManager on site.master and a RadAjaxManagerProxy on detail1.aspx. RadAjaxManagerProxy ajaxifies grid 1 and grid 2 as follows:

Grid 2:

<telerik:AjaxSetting AjaxControlID="RadGridPayeeHistory">
    <UpdatedControls>                    
       <telerik:AjaxUpdatedControl ControlID="tbMethod" />                    
      <telerik:AjaxUpdatedControl ControlID="lblPayee" />  
      <telerik:AjaxUpdatedControl ControlID="RadGridPayeeHistory" LoadingPanelID="RadAjaxLoadingPanel3" />                                             
  </UpdatedControls>
  </telerik:AjaxSetting>

Grid 1:
<telerik:AjaxSetting AjaxControlID="RadGridSearchResults">
   <UpdatedControls>
      <telerik:AjaxUpdatedControl ControlID="RadGridSearchResults" LoadingPanelID="RadAjaxLoadingPanel1" />                    
    </UpdatedControls>
</telerik:AjaxSetting>

Detail1.aspx has the RadWindowManager. Each RadWindow displays a web user control which is also registered in detail.aspx. The RadAjaxLoadingPanels are declared in each user control above the grids.
0
Iana Tsolova
Telerik team
answered on 06 May 2011, 01:57 PM
Hello BrianS,

I cannot find anything that can cause the described issue based on the provided information.
Can you open a formal support ticket and send us a runnable sample there? We will debug it locally and turn back to you with a resolution.

Best wishes,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
BrianS
Top achievements
Rank 1
answered on 06 May 2011, 02:05 PM
I will work on a sample. This may take some time.

In the mean time, are there any quick workarounds to have the next/previous buttons display the ajax loading panel for grid 2 with the current markup?
0
Iana Tsolova
Telerik team
answered on 09 May 2011, 02:27 PM
Hello BrianS,

The loading panel should be displayed when you click on the First, Next, Prev, Last pager buttons as it is displayed when you click on the numeric pager buttons. I assume that once we solve the issue with First, Next, Prev, Last pager buttons, the loading panel will be displayed out of the box.

You can see how it works here for example.

Kind regards,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
BrianS
Top achievements
Rank 1
answered on 09 May 2011, 03:30 PM
I was able to determine the problem, however I'm not sure why it occured.

An unrelated AjaxSetting item was the cause. The Ajax control for this AjaxSetting was a standard html button and the updated control was a different grid. Once I removed this AjaxSetting, the orginal grids displayed the loading panel as expected. The controls for this AjaxSetting were named differently, but yet somehow were "interfering" with the other controls.

I removed this AjaxSetting and the issue is resolved. Thanks.
Tags
Grid
Asked by
BrianS
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
BrianS
Top achievements
Rank 1
Share this question
or