In RadTreeList After Update , The values are not updated with reloading the page

3 posts, 0 answers
  1. saravanakumar subramaniam
    saravanakumar subramaniam avatar
    28 posts
    Member since:
    May 2010

    Posted 07 Jul 2011 Link to this post

     

    Hi,
    I am Using RadTreeList . In RadTreeList I  am Using InPlace Edit Mode And I am Trying to the update values by Using  RadTreeList1_UpdateCommand

    The Above is event is fired and values are update on db but on the RadTreeList the updated value is not shown . I have to refresh or reload the page to see the updated value .

    Please update on how to resolve this ASAP.

     

     <telerik:RadTreeList runat="server" ID="RadTreeList2" DataKeyNames="CloseOutID"  

    ParentDataKeyNames="ParentID" AutoGenerateColumns="False"  

    AllowMultiItemEdit="True" EditMode="InPlace" >  

     

    <Columns>

     <telerik:TreeListEditCommandColumn UniqueName="EditCommandColumn" ShowAddButton="false" ButtonType="ImageButton">

     <ItemStyle CssClass="MyImageButton" />

     </telerik:TreeListEditCommandColumn>

     <telerik:TreeListBoundColumn DataField="CloseOutID"

     HeaderText="CloseOut ID" UniqueName="CloseOutID" Visible ="false" ReadOnly="true" />

     <telerik:TreeListTemplateColumn ReadOnly="true" >

     <HeaderTemplate>

     <asp:Label ID="lblheaderRetentionOutputFile" runat="server" Text="RetentionOutputFile"></asp:Label>

     </HeaderTemplate>

     <ItemTemplate >

     <asp:HyperLink ID="hlinkRetentionOutputFile" Visible="true" NavigateUrl='<%# Eval("RetentionOutputFile") %>' runat="server">Browse</asp:HyperLink>

     <asp:Image ID="imgRetentionOutputFile" Visible ="false" ImageUrl="~/Images/folder.gif" runat="server" />

     </ItemTemplate>

     </telerik:TreeListTemplateColumn>

     <telerik:TreeListTemplateColumn >

     <HeaderTemplate>

     <asp:Label ID="lblStatus" runat="server" Text="Status" ></asp:Label>

     </HeaderTemplate>

     <ItemTemplate>

     <asp:HiddenField ID="hdfStatusCode" runat="server" Value='<%# Eval("StatusCode") %>' />

     <asp:Label ID="lblStatusMessage" runat="server" Text='<%# Eval("Status") %>' ></asp:Label>

     <asp:Button ID="btnActivate" runat="server" Text="Activate" Visible="false" CommandName="Activate" CommandArgument='<%# Eval("TaskID") %>' />

     </ItemTemplate>

     <EditItemTemplate>

     <asp:HiddenField ID="hdfStatusCode" runat="server" Value='<%# Eval("StatusCode") %>' />

     <asp:Label ID="lblStatusMessage" runat="server" Text='<%# Eval("Status") %>' ></asp:Label>

     <asp:Button ID="btnActivate" runat="server" Text="Activate" Visible="false" CommandName="Activate" CommandArgument='<%# Eval("TaskID") %>' />

     </EditItemTemplate>

     </telerik:TreeListTemplateColumn>

     <telerik:TreeListTemplateColumn >

     <HeaderTemplate>

     <asp:Label ID="lblExpiryDate" runat="server" Text="Expiry Date"></asp:Label>

     </HeaderTemplate>

     <ItemTemplate>

     <asp:Label ID="lblExpirationDate" runat="server" Text='<%# Eval("ExpirationDate") %>'></asp:Label>

     </ItemTemplate>

     <EditItemTemplate>

     <asp:HiddenField ID="hdfJobID" runat="server" Value='<%# Eval("JobID") %>' />

     <asp:TextBox ID="txtExpirationDate" Width="100px" CssClass="radEnabledCss_Default" Text='<%# Eval("ExpirationDate", "{0:d}") %>'

     onclick="showPopup(this, event);" onfocus="showPopup(this, event);" onblur="parseDate(this, event)"

     runat="server" >

     </asp:TextBox>

     </EditItemTemplate>

     </telerik:TreeListTemplateColumn>

     </Columns>

     </telerik:RadTreeList>

     

     

  2. saravanakumar subramaniam
    saravanakumar subramaniam avatar
    28 posts
    Member since:
    May 2010

    Posted 07 Jul 2011 Link to this post

    In RadTreeList After Update using the Edit Mode:  InPlace , The values are not updated without  reloading the page.

    Private Sub RadTreeList2_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.TreeListCommandEventArgs) Handles RadTreeList2.UpdateCommand

     Dim editedItem As TreeListDataItem = TryCast(e.Item, TreeListDataItem)

     Dim ExpirationDate As String = TryCast(editedItem.FindControl("txtExpirationDate"), TextBox).Text

     Dim JobID As String = TryCast(editedItem.FindControl("hdfJobID"), HiddenField).Value

     Dim BL As New BL

     BL.UpdateExpirationDate(ExpirationDate, JobID)

     End Sub

     

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 12 Jul 2011 Link to this post

    Hello Saravanakumar,

    Try rebinding the treelist after update:

    Private Sub RadTreeList2_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.TreeListCommandEventArgs) Handles RadTreeList2.UpdateCommand
     
     Dim editedItem As TreeListDataItem = TryCast(e.Item, TreeListDataItem)
     
     Dim ExpirationDate As String = TryCast(editedItem.FindControl("txtExpirationDate"), TextBox).Text
     
     Dim JobID As String = TryCast(editedItem.FindControl("hdfJobID"), HiddenField).Value
     
     Dim BL As New BL
     
     BL.UpdateExpirationDate(ExpirationDate, JobID)
      
     RadTreeList2.Rebind()
     
     End Sub


    Greetings,
    Veli
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top