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

Google-Style Filtering and Editing after Filter

8 Answers 118 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jfkrueger
Top achievements
Rank 1
jfkrueger asked on 15 Dec 2008, 05:13 PM
I am using the google-style filtering on a grid and it is working great for the most part. The only problem is that if i select a filter from the drop-down and then try to edit one of the rows returned the filter goes away and the edit form pops up with a completely different record than what was selected. Any suggestions?

Thanks!

8 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 18 Dec 2008, 10:21 AM
Hi Joe,

I tested the functionality locally, and the control behaved as expected.
If the issue persists at your end, you can open a formal support ticket, and send us a small project, demonstrating your implementation, and the problematic behavior, for further local testing.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
jfkrueger
Top achievements
Rank 1
answered on 18 Dec 2008, 06:23 PM
Yes, the problem still persists. Try wrapping the grid in a RadAjaxPanel.
0
jfkrueger
Top achievements
Rank 1
answered on 18 Dec 2008, 09:06 PM
If i remove the RadAjaxPanel from around the grid it works fine but that is not an acceptable solution becuase I do not want the page doing full postbacks every time something in the grid changes (sort, page size, etc.). The full postbacks are annoying and non-professional looking to the users plus I lose the loading panel for longer operations in the grid. Is there a better way to "ajaxify" the grid without losing the ability to do google-style filtering with edits?
0
Yavor
Telerik team
answered on 22 Dec 2008, 06:33 AM
Hello Joe,

I ajaxified the control as well, and no such behavior was exhibited. I suspect there must be something else causing this behavior. You can open a formal support ticket, where you can attach files, and send us the problematic application for further review.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
jfkrueger
Top achievements
Rank 1
answered on 22 Dec 2008, 04:21 PM
Before I go through the trouble of creating a sample project and opening a formal support ticket let me try this one more time. Please try the following, this is exactly how I have it setup.

Here is the hierarcy of my pages/controls:

Display.aspx --> Contains Web User Control with a RadPanelBar
     - WebUserControl with a RadPanelBar: Surround the RadPanelBar with a RadAjaxPanel - Inside each RadPanelItem is another WebUserControl with a RadGrid using the Google-Style Filtering.
         - WebUserControl with RadGrid using Google-Style Filtering: Surrounded by a RadAjaxPanel.

So I have an aspx page with a web user control (ascx) that contains other web user controls. The content in each web user control is surrounded by a RadAjaxPanel. 

If I remove the RadAjaxPanel from around the RadPanelBar in the first WebUserControl it works fine as you have seen, however when the RadPanelBar has a RadAjaxPanel around it the behavior is like I described. So it must be a problem with Nested RadAjaxPanels.

Please try this approach and see if you can duplicate the issue. Code examples below.

1st Web User Control surrounded by AjaxPanel
<telerik:RadAjaxPanel ID="rlpMain" runat="server" LoadingPanelID="rlpMain">  
 
    <telerik:RadPanelBar   
        ID="rpbCSRLists"   
        runat="server"   
        ExpandMode="SingleExpandedItem"   
        AllowCollapseAllItems="true"   
        Width="100%"   
        PersistStateInCookie="true" 
        OnClientItemExpand="OnClientItemExpand">  
 
            <Items> 
 
                <telerik:RadPanelItem Text="Alternative Words to Search In Plan Documents" Selected="true">  
                      
                    <Items>    
                      
                        <telerik:RadPanelItem> 
                          
                            <ItemTemplate> 
                                   
                                <CSR:AlternativeWords ID="uctAlternativeWords" runat="server" /> 
                                  
                            </ItemTemplate>      
                          
                        </telerik:RadPanelItem> 
                      
                    </Items> 
                      
                </telerik:RadPanelItem> 
                  
            </Items> 
 
        </telerik:RadPanelBar> 
   
 </telerik:RadAjaxPanel> 

2nd Web User Control (Inside the RadPanelItem):
<telerik:RadAjaxPanel ID="rapMain" runat="server" LoadingPanelID="rlpMain">  
 
    <telerik:RadGrid ID="rgAlternativeWords"   
        AutoGenerateColumns="False"   
        AllowPaging="True"   
        AllowSorting="True" 
        AllowFilteringByColumn="True"   
        runat="server"   
        GridLines="None" > 
          
        <HeaderContextMenu EnableTheming="False">  
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </HeaderContextMenu> 
          
        <PagerStyle Mode="NumericPages" PageButtonCount="5" AlwaysVisible="true" /> 
 
        <MasterTableView> 
          
            <CommandItemTemplate> 
              
                <tr> 
                    <td colspan="3" style="padding-left:10px">  
                      
                        <asp:Button ID="AddNewRecordButton" Runat="server" Visible="false" CommandName="InitInsert" CssClass="rgAdd"></asp:Button> 
                        <asp:LinkButton ID="InitInsertButton" runat="server" Visible="false" CommandName="InitInsert">Add New Record</asp:LinkButton> 
                          
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
                        <asp:LinkButton ID="lbClearFilters" runat="server" OnClick="lbClearFilters_Click">Clear Filters</asp:LinkButton> 
                          
                    </td>    
                    <td style="text-align:right; padding-right:10px">  
                        <asp:Button ID="RefreshButton" runat="server" CommandName="Re bindGrid" ToolTip="Refresh" CssClass="rgRefresh" /> 
                        <asp:LinkButton ID="RebindGridButton" runat="server" CommandName="Re bindGrid" ToolTip="Refresh">Refresh</asp:LinkButton>   
                    </td> 
                                    
                </tr> 
                  
            </CommandItemTemplate> 
            <Columns> 
              
                <telerik:GridEditCommandColumn ButtonType="ImageButton" Visible="false" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>                  
                <telerik:GridButtonColumn ConfirmText="Delete this record?" Visible="false" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" 
                        CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">  
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                </telerik:GridButtonColumn> 
 
            </Columns> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <EditFormSettings EditFormType="Template">  
                <EditColumn UniqueName="EditCommandColumn1">  
                </EditColumn> 
                <FormTemplate>      
                    <br />         
                    <div class="divCol">Original Word:</div> 
                    <div class="divColLast"><telerik:RadTextBox ID="txtOriginalWordEdit" runat="server" Columns="25" MaxLength="50" Text='<%# Bind("BaseWord") %>' SelectionOnFocus="SelectAll"></telerik:RadTextBox></div>  
                    <div class="clearer"></div> 
                      
                    <div class="divCol">Alternate Words:</div> 
                    <div class="divColLast">  
                        <telerik:RadTextBox ID="txtAlternateWords" runat="server" Columns="45" Rows="5" MaxLength="255" TextMode="MultiLine" Text='<%# Bind("AlternativeWords") %>' SelectionOnFocus="CaretToEnd"></telerik:RadTextBox>                                  
                    </div> 
                    <div class="clearer"></div> 
                      
                    <table style="width: 100%">  
                        <tr> 
                            <td align="center" colspan="2">  
                                <asp:Button ID="btnSubmit" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>' 
                                    runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'>  
                                </asp:Button>&nbsp;  
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">  
                                </asp:Button> 
                            </td> 
                        </tr> 
                    </table> 
 
                </FormTemplate> 
           </EditFormSettings> 
            <PagerTemplate> 
              
                <asp:Panel ID="pnlAlternativeWordsPager" Style="padding: 6px;" runat="server">  
                  
                    <asp:Panel runat="server" ID="NumericPagerPlaceHolder" ></asp:Panel>   
                  
                    <span style="float: right;">Displaying page  
                        <%#CType(DataBinder.Eval(Container, "Paging.CurrentPageIndex"), Int32) + 1%> 
                        of  
                        <%# DataBinder.Eval(Container, "Paging.PageCount")%>, items from  
                        <%#CType(DataBinder.Eval(Container, "Paging.FirstIndexInPage"), Int32) + 1%> 
                        to  
                        <%#CType(DataBinder.Eval(Container, "Paging.LastIndexInPage"), Int32) + 1%> 
                        of  
                        <%# DataBinder.Eval(Container, "Paging.DataSourceCount")%>.  
                    </span> 
                      
                    <br /> 
                      
                    <div style="text-align:left">  
                      
                        <span style="margin-top: 2px; margin-right: 3px;">Page size:</span> 
                          
                        <telerik:RadComboBox ID="rcbAlternativeWordsPageSize" DataSource="<%# New Object(){10, 20, 30, 40, 50} %>" 
                            Style="margin-top: 2px; margin-right: 20px;" 
                            Width="40px" SelectedValue='<%# DataBinder.Eval(Container, "Paging.PageSize") %>' 
                            runat="server" OnClientSelectedIndexChanged="rcbAlternativeWordsPageSize_SelectedIndexChanged">  
                        </telerik:RadComboBox> 
                          
                        <asp:Button ID="btnAlternativeWordsFirstPage" runat="server" OnClientClick="changeAlternativeWordsPage('first'); return false;" CommandName="Page" CommandArgument="First" CssClass="rgPageFirst" /> 
                        <asp:Button ID="btnAlternativeWordsPrviousPage" runat="server" OnClientClick="changeAlternativeWordsPage('prev'); return false;" CommandName="Page" CommandArgument="Prev" CssClass="rgPagePrev" /> 
                          
                        <span style="vertical-align: middle;">Page:</span> 
                          
                        <telerik:RadNumericTextBox ID="rntbAlternativeWordsCurrentPage" Width="25px" Value='<%# CType(DataBinder.Eval(Container, "Paging.CurrentPageIndex"), Int32) + 1 %>' runat="server">  
                            <ClientEvents OnValueChanged="rntbAlternativeWordsCurrentPage_ValueChanged" /> 
                            <NumberFormat DecimalDigits="0" /> 
                        </telerik:RadNumericTextBox> 
                          
                        <span style="vertical-align: middle;">of  
                            <%# DataBinder.Eval(Container, "Paging.PageCount")%> 
                        </span> 
                          
                        <asp:Button ID="btnAlternativeWordsNextPage" runat="server" OnClientClick="changeAlternativeWordsPage('next'); return false;" CommandName="Page" CommandArgument="Next" CssClass="rgPageNext" /> 
                        <asp:Button ID="btnAlternativeWordsLastPage" runat="server" OnClientClick="changeAlternativeWordsPage('last'); return false;" CommandName="Page" CommandArgument="Last" CssClass="rgPageLast" /> 
                          
                    </div> 
          
                </asp:Panel> 
 
            </PagerTemplate> 
             
        </MasterTableView> 
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">  
        </ClientSettings> 
        <FilterMenu> 
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </FilterMenu> 
 
    </telerik:RadGrid> 
 
</telerik:RadAjaxPanel> 

Thanks!
   
0
jfkrueger
Top achievements
Rank 1
answered on 22 Dec 2008, 04:34 PM
In the code example above the ID of the RadAjaxPanel in the 1st Web User Control is "rapMain", not "rlpMain".
0
Yavor
Telerik team
answered on 29 Dec 2008, 10:39 AM
Hi Joe,

Unfortunately, the grid control includes no code for the way that it is populated with data, hence I cannot replicate the same behavior locally. As mentioned previously, you can open a formal support ticket, and send us the problematic implementation, for local testing.

Sincerely yours,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
jfkrueger
Top achievements
Rank 1
answered on 29 Dec 2008, 04:17 PM
Here is what I had to do to get it to work correctly, although now If I need to ajaxify the panel bar I probably can't. But that's ok for now at least.

<telerik:RadPanelBar   
    ID="rpbCSRLists"   
    runat="server"   
    ExpandMode="SingleExpandedItem"   
    AllowCollapseAllItems="true"   
    Width="100%"   
    PersistStateInCookie="true" 
    OnClientItemExpand="OnClientItemExpand" 
    OnClientItemCollapse="OnClientItemCollapse">  
 
        <Items> 
 
            <telerik:RadPanelItem Text="Alternative Words to Search In Plan Documents" Selected="true">  
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpAlternateWords" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapAlternateWords" runat="server" LoadingPanelID="rlpAlternateWords">  
                                <CSR:AlternativeWords ID="uctAlternativeWords" runat="server" /> 
                            </telerik:RadAjaxPanel> 
                              
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="Benefit Code Descriptions" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpBenefitCodes" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapBenefitCodes" runat="server" LoadingPanelID="rlpBenefitCodes">  
                                <CSR:BenefitCodes ID="uctBenefitCodes" runat="server" /> 
                            </telerik:RadAjaxPanel>   
                              
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="Calls Screens That Are Sent To Carelink" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpCallsScreensSentToCarelink" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapCallsScreensSentToCarelink" runat="server" LoadingPanelID="rlpCallsScreensSentToCarelink">  
                                <CSR:CallScreensSentToCarelink ID="uctCallsScreensSentToCarelink" runat="server" /> 
                            </telerik:RadAjaxPanel>   
                              
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="Denial Codes">  
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpDenialCodes" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapDenialCodes" runat="server" LoadingPanelID="rlpDenialCodes">  
                                <CSR:DenialCodes ID="uctDenialCodes" runat="server" /> 
                            </telerik:RadAjaxPanel>   
                              
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="FLEX Message Codes" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpFlexMessageCodes" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapFlexMessageCodes" runat="server" LoadingPanelID="rlpFlexMessageCodes">  
                                <CSR:FLEXMessageCodes ID="uctFlexMessageCodes" runat="server" /> 
                            </telerik:RadAjaxPanel>                                   
                              
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="Group Listing" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpGroupListing" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapGroupListing" runat="server" LoadingPanelID="rlpGroupListing">  
                                <CSR:GroupListing ID="uctGroupListing" runat="server" /> 
                            </telerik:RadAjaxPanel>        
                              
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="Keystrokes" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpKeystrokes" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapKeystrokes" runat="server" LoadingPanelID="rlpKeystrokes">  
                                <CSR:Keystrokes ID="uctKeystrokes" runat="server" /> 
                            </telerik:RadAjaxPanel>      
                                  
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="Phone Numbers" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpPhoneNumbers" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapPhoneNumbers" runat="server" LoadingPanelID="rlpPhoneNumbers">  
                                <CSR:PhoneNumbers ID="uctPhoneNumbers" runat="server" /> 
                            </telerik:RadAjaxPanel>      
                              
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="Place Of Service (POS) Codes" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpPosCodes" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapPosCodes" runat="server" LoadingPanelID="rlpPosCodes">  
                                <CSR:POSCodes ID="uctPosCodes" runat="server" /> 
                            </telerik:RadAjaxPanel>   
                                  
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="PPOs" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpPpos" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapPpos" runat="server" LoadingPanelID="rlpPpos">  
                                <CSR:PPOs ID="uctPPOs" runat="server" /> 
                            </telerik:RadAjaxPanel>   
                                  
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
            <telerik:RadPanelItem Text="Pre-Auth Docuware Codes" > 
                  
                <Items>    
                  
                    <telerik:RadPanelItem> 
                      
                        <ItemTemplate> 
                          
                            <telerik:RadAjaxLoadingPanel ID="rlpPreAuthDocuwareCodes" runat="server" HorizontalAlign="Center" InitialDelayTime="2000">  
                                <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/loading.gif" style="border:0;" /> 
                            </telerik:RadAjaxLoadingPanel>   
                          
                            <telerik:RadAjaxPanel ID="rapPreAuthDocuwareCodes" runat="server" LoadingPanelID="rlpPreAuthDocuwareCodes">  
                                <CSR:PreAuthDocuwareCodes ID="uctPreAuthDocuwareCodes" runat="server" /> 
                            </telerik:RadAjaxPanel>   
                                  
                        </ItemTemplate>      
                      
                    </telerik:RadPanelItem> 
                  
                </Items> 
                  
            </telerik:RadPanelItem> 
              
        </Items> 
 
    </telerik:RadPanelBar> 
 

So instead of wrapping the RadPanelBar in an AjaxPanel and then wrapping the grids inside the user controls in another AjaxPanel I include a loading panel and wrap the actual control declaration in an AjaxPanel within each item template. There are no AjaxPanels or AjaxManagers inside the user controls anymore.
Tags
Grid
Asked by
jfkrueger
Top achievements
Rank 1
Answers by
Yavor
Telerik team
jfkrueger
Top achievements
Rank 1
Share this question
or