ItemTemplate postback question

4 posts, 0 answers
  1. Chris
    Chris avatar
    8 posts
    Member since:
    Dec 2010

    Posted 17 Dec 2010 Link to this post

    I am having trouble accessing the value typed into the textbox on click of a submit button. the control is found however the text property is always empty. Please assist.

    Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click 
      
    For Each item As RadListBoxItem In lbAssignedComponents.Items 
       Dim tbxPageComponentName As TextBox = item.FindControl("tbxPageComponentName") 
    Next
      
    End Sub

    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1"
        <telerik:RadListBox runat="server" ID="lbAvailableComponents" Height="200px" Width="342px" TransferMode="Copy" AllowTransfer="true" AllowTransferDuplicates="true" TransferToID="lbAssignedComponents" AutoPostBackOnTransfer="true"
            <ItemTemplate
                Component: <%# DataBinder.Eval(Container, "Text")%><br /> 
            </ItemTemplate
        </telerik:RadListBox
        <telerik:RadListBox runat="server" ID="lbAssignedComponents" Height="200px" Width="342px" AllowReorder="true" AllowDelete="true" AllowTransfer="false"
            <ItemTemplate
                Component: <%# DataBinder.Eval(Container, "Text")%><br /> 
                Unique Name: <asp:TextBox ID="tbxPageComponentName" runat="server"></asp:TextBox
            </ItemTemplate
        </telerik:RadListBox
    </telerik:RadAjaxPanel>
  2. Chris
    Chris avatar
    8 posts
    Member since:
    Dec 2010

    Posted 21 Dec 2010 Link to this post

    Any thoughts?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chris
    Chris avatar
    8 posts
    Member since:
    Dec 2010

    Posted 07 Jan 2011 Link to this post

    I am still waiting on assistance. Is my question not clear enough?
  5. Ryan
    Ryan avatar
    3 posts
    Member since:
    Sep 2007

    Posted 11 Jan 2011 Link to this post

    I have the same issue as you. I read on another post that to persist the textbox state, you have to add the listboxitem on the server side during runtime. I modified my code, and was able to accomplish this.

    For your reference:
    http://www.telerik.com/community/forums/aspnet-ajax/listbox/problem-with-allowreorder-when-using-itemtemplate.aspx
Back to Top