RadListView not showing at first on Update Panel

4 posts, 0 answers
  1. rubenr
    rubenr avatar
    2 posts
    Member since:
    Aug 2011

    Posted 30 Aug 2011 Link to this post

    Hello,

    I'm using a RadListView inside an UpdatePanel. When I click on a LinkButton and, from the code behind, it executes:

     

     

     

    this.lstSkills.InsertItemPosition = RadListViewInsertItemPosition.LastItem;

     

     

     

    this.btnShowSkillInsert.Visible = false;

     


    it doesn't access to the InsertItemPosition in the RadListView lstSkills, it is just not showing anything until another event is handled, then it appears the content of the InsertItem.

    Any idea of what could happen?

    Thanks in advance!
  2. Stanislav Velikov
    Admin
    Stanislav Velikov avatar
    4 posts

    Posted 02 Sep 2011 Link to this post

    Hi Rubenr,

    Are you using RadScriptManager and RadAjaxManager to wrap the ListView? Note if you are using RadAjaxManager and RadAjaxPanel on wrap the same listview you might be getting this. Can you share the problematic code for better description?

    Best wishes,
    Stanislav Velikov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. rubenr
    rubenr avatar
    2 posts
    Member since:
    Aug 2011

    Posted 02 Sep 2011 Link to this post

    Hi, the code is:

    <asp:UpdatePanel ID="upSkills" runat="server">
           <ContentTemplate>
                   <fieldset class = "thick">
                       <legend>Skills</legend>
                        <telerik:RadListView
                               ID="lstSkills"
                               runat="server"
                               DataKeyNames="Id"
                               DataSourceID = "odsSkill">
                               <LayoutTemplate>
                                   <asp:PlaceHolder ID="ItemPlaceholder" runat="server"></asp:PlaceHolder>
                               </LayoutTemplate>
                               <ItemTemplate>  
                                   <div class = "skillRow">
                                       <fieldset class = "subFieldset">
                                           <div>
                                               <legend>Skill criterion</legend>        
                                               <label class="rosterMultiRowDescription"><%# GetSkillName(Eval("Skill_Id").ToString()) %></label>                                 
                                           </div>                                        
                                           <div>
                                               <legend>Minimum score to pass this section</legend>        
                                               <label class="rosterMultiRowDescription"><%# Eval("Points") %></label>                                 
                                           </div>
                                           <span class="rosterMultiRowButtons">
                                               <asp:LinkButton
                                                   ID="btnEdit"
                                                   runat="server"
                                                   Text="Edit"
                                                   OnClick="OdsSkills_ItemEditing"
                                                   CommandArgument='<%# Eval("Id") %>'
                                                   CommandName="Edit"
                                                   CausesValidation="false" />
                                               <asp:LinkButton
                                                   ID="btnDelete"
                                                   runat="server"
                                                   Text="Delete"
                                                   CommandName="Delete"
                                                   OnClick="OdsSkills_Deleting"
                                                   CommandArgument='<%# Eval("Id") %>' />
                                           </span>      
                                       </fieldset>      
                                   </div>  
                               </ItemTemplate>
                                <EditItemTemplate>               
                                   <div class = "skillRow">
                                       <fieldset class = "subFieldset">
                                           <legend>Skill</legend>
                                           <label>Skills:</label>
                                           <telerik:RadTreeView 
                                               ID="rtvSkills" 
                                               runat="server"                                              
                                               OnInit="RtvSkills_OnInit"
                                               OnLoad="RtvSkills_OnLoad"
                                               OnNodeExpand="RtvSkills_NodeExpand"/>
                   
                                           <div class = "skillScoringPanel">
                                               <fieldset class = "subSubFieldset">
                                                   <legend>Scoring</legend>
                                                   <div class = "skillYearsTable">
                                                       <telerik:RadListView
                                                           ID="lstScoringSkills"
                                                           runat="server"
                                                           DataKeyNames="Id"      
                                                           OnCommand="LstScoringSkills_ItemCanceling"   AllowMultiItemEdit = "true" AllowMultiItemSelection="true"                                              
                                                           DataSourceID = "odsSkillCriterionRange">
                                                           <LayoutTemplate>
                                                               <asp:PlaceHolder ID="ItemPlaceholder" runat="server"></asp:PlaceHolder>
                                                           </LayoutTemplate>
                                                           <ItemTemplate>
                                                               <div>
                                                               <label>From</label>                                                            
                                                               <asp:TextBox
                                                                   ID="txtSkillYearsFrom" 
                                                                   CssClass="skillYearsTextbox"
                                                                   runat="server"
                                                                   Enabled="false"
                                                                   Text=<%# Eval("From") %>>
                                                               </asp:TextBox>
                                                               <label>to</label>
                                                               <asp:TextBox
                                                                   ID="txtSkillYearsTo" 
                                                                   CssClass="skillYearsTextbox"
                                                                   runat="server"
                                                                   Enabled="false"
                                                                   Text=<%# Eval("To") %>>
                                                               </asp:TextBox>
                                                               <label>years of experience = </label>
                                                               <asp:TextBox
                                                                   ID="txtSkillYearsPoints" 
                                                                   CssClass="pointsTextbox"
                                                                   runat="server"
                                                                   Enabled="false"
                                                                   Text=<%# Eval("Points") %>>
                                                               </asp:TextBox>
                                                               <label>points</label>
                                                               <asp:LinkButton
                                                                   ID="lnkEditSkillRange"
                                                                   runat="server"
                                                                   Text="Edit"
                                                                   CommandName="Edit"
                                                                   CausesValidation="false" />
                                                               <asp:LinkButton
                                                                   ID="lnkDelete"
                                                                   runat="server"
                                                                   Text="Delete"
                                                                   OnClick="LstScoringSkills_ItemDeleting"                                                               
                                                                   CommandArgument='<%# Eval("Id") %>' />
                                                                   </div>
                                                           </ItemTemplate>
                                                           <EditItemTemplate>
                                                                    <div class = "skillYearsRow">
                                                                   <label>From</label>
                                                                   <asp:TextBox
                                                                       ID="txtSkillYearsFrom" 
                                                                       CssClass="skillYearsTextbox"
                                                                       runat="server"
                                                                       Text=<%# Eval("From") %>>
                                                                   </asp:TextBox>
                                                                    <asp:RegularExpressionValidator 
                                                                       ID="revSkillYearsFrom"
                                                                       runat="server"
                                                                       Display="Dynamic"
                                                                       ValidationExpression="\d+"
                                                                       ControlToValidate="txtSkillYearsFrom"
                                                                       CssClass="failureNotification"
                                                                       Text="Only digits allowed">
                                                                   </asp:RegularExpressionValidator>
                                                                   <label>to</label>
                                                                   <asp:TextBox
                                                                       ID="txtSkillYearsTo" 
                                                                       CssClass="skillYearsTextbox"
                                                                       runat="server"
                                                                        Text=<%# Eval("To") %>>
                                                                   </asp:TextBox>
                                                                   <asp:RegularExpressionValidator 
                                                                       ID="revSkillYearsTo"
                                                                       runat="server"
                                                                       Display="Dynamic"
                                                                       ValidationExpression="\d+"
                                                                       ControlToValidate="txtSkillYearsTo"
                                                                       CssClass="failureNotification"
                                                                       Text="Only digits allowed">
                                                                   </asp:RegularExpressionValidator>
                                                                   <label>years of experience = </label>
                                                                   <asp:TextBox
                                                                       ID="txtSkillYearsPoints" 
                                                                       CssClass="pointsTextbox"
                                                                       runat="server"
                                                                       Text=<%# Eval("Points") %>>
                                                                   </asp:TextBox>
                                                                   <asp:RegularExpressionValidator 
                                                                       ID="revSkillYearsPoints"
                                                                       runat="server"
                                                                       Display="Dynamic"
                                                                       ValidationExpression="\d+"
                                                                       ControlToValidate="txtSkillYearsPoints"
                                                                       CssClass="failureNotification"
                                                                       Text="Only digits allowed">
                                                                   </asp:RegularExpressionValidator>
                                                                   <label>points</label>
                                                               </div>    
                                                                   <asp:Button
                                                                       ID="btnRangeSaveUpdateSkills"
                                                                       runat="server"
                                                                       Text="Update"
                                                                       CommandArgument=<%# Eval("Id") %>
                                                                       CommandName="Update"/>
                                                                   <asp:Button
                                                                       ID="btnCancelInsertSkillsRange"
                                                                       runat="server"
                                                                       Text="Cancel"
                                                                       CausesValidation="false"
                                                                       CommandName="Cancel"/>  
                                                           </EditItemTemplate>
                                                           <InsertItemTemplate>
                                                       <div class = "skillYearsRow">
                                                           <label>From</label>
                                                           <asp:TextBox
                                                               ID="txtSkillYearsFrom" 
                                                               CssClass="skillYearsTextbox"
                                                               runat="server">
                                                           </asp:TextBox>
                                                            <asp:RegularExpressionValidator 
                                                               ID="revSkillYearsFrom"
                                                               runat="server"
                                                               Display="Dynamic"
                                                               ValidationExpression="\d+"
                                                               ControlToValidate="txtSkillYearsFrom"
                                                               CssClass="failureNotification"
                                                               Text="Only digits allowed">
                                                           </asp:RegularExpressionValidator>
                                                           <label>to</label>
                                                           <asp:TextBox
                                                               ID="txtSkillYearsTo" 
                                                               CssClass="skillYearsTextbox"
                                                               runat="server">
                                                           </asp:TextBox>
                                                           <asp:RegularExpressionValidator 
                                                               ID="revSkillYearsTo"
                                                               runat="server"
                                                               Display="Dynamic"
                                                               ValidationExpression="\d+"
                                                               ControlToValidate="txtSkillYearsTo"
                                                               CssClass="failureNotification"
                                                               Text="Only digits allowed">
                                                           </asp:RegularExpressionValidator>
                                                           <label>years of experience = </label>
                                                           <asp:TextBox
                                                               ID="txtSkillYearsPoints" 
                                                               CssClass="pointsTextbox"
                                                               runat="server">
                                                           </asp:TextBox>
                                                           <asp:RegularExpressionValidator 
                                                               ID="revSkillYearsPoints"
                                                               runat="server"
                                                               Display="Dynamic"
                                                               ValidationExpression="\d+"
                                                               ControlToValidate="txtSkillYearsPoints"
                                                               CssClass="failureNotification"
                                                               Text="Only digits allowed">
                                                           </asp:RegularExpressionValidator>
                                                           <label>points</label>
                                                       </div>    
                                                           <asp:Button
                                                               ID="btnRangeSaveUpdateSkills"
                                                               runat="server"
                                                               Text="Save"
                                                               CommandName="Update"/>
                                                           <asp:Button
                                                               ID="btnCancelInsertSkillsRange"
                                                               runat="server"
                                                               Text="Cancel"
                                                               CausesValidation="false"
                                                               CommandName="Cancel"/>  
                                                     </InsertItemTemplate>
                                                  </telerik:RadListView>               
                                                                                         
                                                           <asp:LinkButton
                                                               ID="btnShowRangeSkillInsert"
                                                               runat="server"
                                                               Text="Add another range"
                                                               CssClass="addRowButton"                                                           
                                                               OnClick="BtnAddRangeSkill_Click" />  
                                                                                                       
                                                           <div class = "skillYearsMinimum minPointsPanel">
                                                               <label>Minimum score to pass this section:</label>
                                                               <asp:TextBox
                                                                   ID="txtFirstSkillMinPoints" 
                                                                   CssClass="pointsTextbox minScoreBox"
                                                                   runat="server"
                                                                   Text=<%# Eval("Points") %>>
                                                               </asp:TextBox>
                                                               <asp:RegularExpressionValidator 
                                                                   ID="revFirstSkillMinPoints"
                                                                   runat="server"
                                                                   Display="Dynamic"
                                                                   ValidationExpression="\d+"
                                                                   ControlToValidate="txtFirstSkillMinPoints"
                                                                   CssClass="failureNotification"
                                                                   Text="Only digits allowed">
                                                               </asp:RegularExpressionValidator>
                                                           </div>
                                                       </div>
                                                   </fieldset>
                                                       <asp:CustomValidator 
                                                           id="cvValidateCurrentSkill" 
                                                           runat="server" 
                                                           OnServerValidate="ValidateCurrentSkill" >
                                                       </asp:CustomValidator>  
                                                   </div>                                       
                                                   <asp:Button
                                                       ID="btnSaveUpdate"
                                                       runat="server"
                                                       Text="Update"
                                                       CommandName="Update" />
                                                   <asp:Button
                                                       ID="btnCancelInsert"
                                                       runat="server"
                                                       Text="Cancel"
                                                       CausesValidation="false"
                                                       CommandName="Cancel" />   
                                               </fieldset>            
                                       </div>                                                     
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                         
                                       <div class = "skillRow">
                                       <fieldset class = "subFieldset">
                                           <legend>Skill</legend>
                                           <label>Skills:</label>
                                           <telerik:RadTreeView 
                                               ID="rtvSkills" 
                                               runat="server"                                              
                                               OnInit="RtvSkills_OnInit"
                                               OnLoad="RtvSkills_OnLoad"
                                               OnNodeExpand="RtvSkills_NodeExpand" />
                   
                                           <div class = "skillScoringPanel">
                                               <fieldset class = "subSubFieldset">
                                                   <legend>Scoring</legend>
                                                   <div class = "skillYearsTable">
                                                       <telerik:RadListView
                                                           ID="lstScoringSkills"
                                                           runat="server"
                                                           DataKeyNames="Id"      
                                                           OnCommand="LstScoringSkills_ItemCanceling"                                                  
                                                           DataSourceID = "odsSkillCriterionRange">
                                                           <LayoutTemplate>
                                                               <asp:PlaceHolder ID="ItemPlaceholder" runat="server"></asp:PlaceHolder>
                                                           </LayoutTemplate>
                                                           <ItemTemplate>
                                                               <div>
                                                               <label>From</label>
                                                               <asp:TextBox
                                                                   ID="txtSkillYearsFrom" 
                                                                   CssClass="skillYearsTextbox"
                                                                   runat="server"
                                                                   Enabled="false"
                                                                   Text=<%# Eval("From") %>>
                                                               </asp:TextBox>
                                                               <label>to</label>
                                                               <asp:TextBox
                                                                   ID="txtSkillYearsTo" 
                                                                   CssClass="skillYearsTextbox"
                                                                   runat="server"
                                                                   Enabled="false"
                                                                   Text=<%# Eval("To") %>>
                                                               </asp:TextBox>
                                                               <label>years of experience = </label>
                                                               <asp:TextBox
                                                                   ID="txtSkillYearsPoints" 
                                                                   CssClass="pointsTextbox"
                                                                   runat="server"
                                                                   Enabled="false"
                                                                   Text=<%# Eval("Points") %>>
                                                               </asp:TextBox>
                                                               <label>points</label>
                                                               <asp:LinkButton
                                                                   ID="lnkEditSkillRange"
                                                                   runat="server"
                                                                   Text="Edit"
                                                                   CommandName="Edit"
                                                                   CausesValidation="false" />
                                                               <asp:LinkButton
                                                                   ID="lnkDelete"
                                                                   runat="server"
                                                                   Text="Delete"
                                                                   OnClick="LstScoringSkills_ItemDeleting"                                                               
                                                                   CommandArgument='<%# Eval("Id") %>' />
                                                              </div>
                                                           </ItemTemplate>
                                                           <EditItemTemplate>
                                                                    <div class = "skillYearsRow">
                                                                   <label>From</label>
                                                                   <asp:TextBox
                                                                       ID="txtSkillYearsFrom" 
                                                                       CssClass="skillYearsTextbox"
                                                                       runat="server"
                                                                       Text=<%# Eval("From") %>>
                                                                   </asp:TextBox>
                                                                    <asp:RegularExpressionValidator 
                                                                       ID="revSkillYearsFrom"
                                                                       runat="server"
                                                                       Display="Dynamic"
                                                                       ValidationExpression="\d+"
                                                                       ControlToValidate="txtSkillYearsFrom"
                                                                       CssClass="failureNotification"
                                                                       Text="Only digits allowed">
                                                                   </asp:RegularExpressionValidator>
                                                                   <label>to</label>
                                                                   <asp:TextBox
                                                                       ID="txtSkillYearsTo" 
                                                                       CssClass="skillYearsTextbox"
                                                                       runat="server"
                                                                        Text=<%# Eval("To") %>>
                                                                   </asp:TextBox>
                                                                   <asp:RegularExpressionValidator 
                                                                       ID="revSkillYearsTo"
                                                                       runat="server"
                                                                       Display="Dynamic"
                                                                       ValidationExpression="\d+"
                                                                       ControlToValidate="txtSkillYearsTo"
                                                                       CssClass="failureNotification"
                                                                       Text="Only digits allowed">
                                                                   </asp:RegularExpressionValidator>
                                                                   <label>years of experience = </label>
                                                                   <asp:TextBox
                                                                       ID="txtSkillYearsPoints" 
                                                                       CssClass="pointsTextbox"
                                                                       runat="server"
                                                                       Text=<%# Eval("Points") %>>
                                                                   </asp:TextBox>
                                                                   <asp:RegularExpressionValidator 
                                                                       ID="revSkillYearsPoints"
                                                                       runat="server"
                                                                       Display="Dynamic"
                                                                       ValidationExpression="\d+"
                                                                       ControlToValidate="txtSkillYearsPoints"
                                                                       CssClass="failureNotification"
                                                                       Text="Only digits allowed">
                                                                   </asp:RegularExpressionValidator>
                                                                   <label>points</label>
                                                               </div>    
                                                                   <asp:Button
                                                                       ID="btnRangeSaveUpdateSkills"
                                                                       runat="server"
                                                                       Text="Update"
                                                                       CommandArgument=<%# Eval("Id") %>
                                                                       CommandName="Update"/>
                                                                   <asp:Button
                                                                       ID="btnCancelInsertSkillsRange"
                                                                       runat="server"
                                                                       Text="Cancel"
                                                                       CausesValidation="false"
                                                                       CommandName="Cancel"/>  
                                                           </EditItemTemplate>
                                                           <InsertItemTemplate>
                                                       <div class = "skillYearsRow">
                                                           <label>From</label>
                                                           <asp:TextBox
                                                               ID="txtSkillYearsFrom" 
                                                               CssClass="skillYearsTextbox"
                                                               runat="server">
                                                           </asp:TextBox>
                                                            <asp:RegularExpressionValidator 
                                                               ID="revSkillYearsFrom"
                                                               runat="server"
                                                               Display="Dynamic"
                                                               ValidationExpression="\d+"
                                                               ControlToValidate="txtSkillYearsFrom"
                                                               CssClass="failureNotification"
                                                               Text="Only digits allowed">
                                                           </asp:RegularExpressionValidator>
                                                           <label>to</label>
                                                           <asp:TextBox
                                                               ID="txtSkillYearsTo" 
                                                               CssClass="skillYearsTextbox"
                                                               runat="server">
                                                           </asp:TextBox>
                                                           <asp:RegularExpressionValidator 
                                                               ID="revSkillYearsTo"
                                                               runat="server"
                                                               Display="Dynamic"
                                                               ValidationExpression="\d+"
                                                               ControlToValidate="txtSkillYearsTo"
                                                               CssClass="failureNotification"
                                                               Text="Only digits allowed">
                                                           </asp:RegularExpressionValidator>
                                                           <label>years of experience = </label>
                                                           <asp:TextBox
                                                               ID="txtSkillYearsPoints" 
                                                               CssClass="pointsTextbox"
                                                               runat="server">
                                                           </asp:TextBox>
                                                           <asp:RegularExpressionValidator 
                                                               ID="revSkillYearsPoints"
                                                               runat="server"
                                                               Display="Dynamic"
                                                               ValidationExpression="\d+"
                                                               ControlToValidate="txtSkillYearsPoints"
                                                               CssClass="failureNotification"
                                                               Text="Only digits allowed">
                                                           </asp:RegularExpressionValidator>
                                                           <label>points</label>
                                                       </div>    
                                                           <asp:Button
                                                               ID="btnRangeSaveUpdateSkills"
                                                               runat="server"
                                                               Text="Save"
                                                               CommandName="Update"/>
                                                           <asp:Button
                                                               ID="btnCancelInsertSkillsRange"
                                                               runat="server"
                                                               Text="Cancel"
                                                               CausesValidation="false"
                                                               CommandName="Cancel"/>  
                                                           </InsertItemTemplate>
                                                   </telerik:RadListView>                                                                                                      
                                                       <asp:LinkButton
                                                           ID="btnShowRangeSkillInsert"
                                                           runat="server"
                                                           Text="Add another range"
                                                           CssClass="addRowButton"
                                                           OnClick="BtnAddRangeSkill_Click" />  
                                                                                                       
                                                       <div class = "skillYearsMinimum minPointsPanel">
                                                           <label>Minimum score to pass this section:</label>
                                                           <asp:TextBox
                                                               ID="txtFirstSkillMinPoints" 
                                                               CssClass="pointsTextbox minScoreBox"
                                                               runat="server">
                                                           </asp:TextBox>
                                                           <asp:RegularExpressionValidator 
                                                               ID="revFirstSkillMinPoints"
                                                               runat="server"
                                                               Display="Dynamic"
                                                               ValidationExpression="\d+"
                                                               ControlToValidate="txtFirstSkillMinPoints"
                                                               CssClass="failureNotification"
                                                               Text="Only digits allowed">
                                                           </asp:RegularExpressionValidator>
                                                       </div>
                                                   </div>
                                               </fieldset>
                                           <asp:CustomValidator 
                                               id="cvValidateCurrentSkill" 
                                               runat="server" 
                                               OnServerValidate="ValidateCurrentSkill" >
                                           </asp:CustomValidator>   
                                           </div>                                       
                                           <asp:Button
                                               ID="btnSaveUpdate"
                                               runat="server"
                                               Text="Save"
                                               CommandName="Update" />
                                           <asp:Button
                                               ID="btnCancelInsert"
                                               runat="server"
                                               Text="Cancel"
                                               CausesValidation="false"
                                               CommandName="Cancel" />   
                                       </fieldset>            
                                       </div>                                             
                                                                      
                                </InsertItemTemplate>
                                   <ItemSeparatorTemplate>
                                   </ItemSeparatorTemplate>
                               </telerik:RadListView>     
                               <div class = " minPointsPanel">
                                   <label>Minimum score to pass this section:</label>
                                   <asp:TextBox
                                       ID="txtOverallMinSkillPoints" 
                                       CssClass="pointsTextbox minScoreBox"
                                       runat="server">
                                   </asp:TextBox>
                                   <asp:RegularExpressionValidator 
                                       ID="revOverallMinSkillPoints"
                                       runat="server"
                                       Display="Dynamic"
                                       ValidationExpression="\d+"
                                       ControlToValidate="txtOverallMinSkillPoints"
                                       CssClass="failureNotification"
                                       Text="Only digits allowed">
                                   </asp:RegularExpressionValidator>
                                   <asp:Button
                                       ID="btnSaveUpdateScreeningSetupSkills"
                                       runat="server"
                                       Text="Save"
                                       OnClick="BtnSaveUpdateScreeningSetup_Click"/>
                               </div>    
                                 
                                   <asp:CustomValidator 
                                       id="cvSkills" 
                                       runat="server" 
                                       OnServerValidate="ValidateSkills">
                                   </asp:CustomValidator>
                                                
                                  <asp:LinkButton
                                       ID="btnShowSkillInsert"
                                       runat="server"
                                       CommandName="Insert"
                                       Text="Add Another Skill"
                                       CausesValidation="false"
                                       CssClass = "addRowButton"/>      
                 </fieldset>
           </ContentTemplate>
       </asp:UpdatePanel>
  5. Stanislav Velikov
    Admin
    Stanislav Velikov avatar
    4 posts

    Posted 07 Sep 2011 Link to this post

    Hello Rubenr,

    Try adding to your control
    RadScriptManager
    RadAjaxLoadingPanel 
    RadAjaxPanel

    For more information refer to this demo code.

    Best wishes,
    Stanislav Velikov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top