Where did the RadComboBox ClientState data go?

2 posts, 0 answers
  1. SSirica
    SSirica avatar
    50 posts
    Member since:
    Jan 2007

    Posted 26 Mar 2015 Link to this post

    Apparently at some point in time, when you wanted to get the selected row data from a RadComboBox  from a calling form you look to the Request.Form item with the _ClientState in it's key.  For example If I had this on Form1:
    <telerik:RadComboBox ID="cbTabDup" runat="server" Height="100px" Width="100px" Skin="Default"
        AutoPostBack="true" DropDownWidth="300px" HighlightTemplatedItems="True" MarkFirstMatch="true"
        ShowDropDownOnTextboxClick="true">
        <ItemTemplate>
            <table cellpadding="1" cellspacing="0" class="Main" width="250px">
                <tr>
                    <td width="100px">
                        <%#DataBinder.Eval(Container.DataItem, "Code")%>
                          
                    </td>
                    <td nowrap>
                        <%#DataBinder.Eval(Container.DataItem, "Description")%>
                    </td>
                    <td style="display: none;">
                        <%# DataBinder.Eval(Container.DataItem, "ID") %>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <HeaderTemplate>
            <table cellpadding="1" cellspacing="0" class="Main" width="250px">
                <tr>
                    <td class="ComboHeader" width="100px">
                        Code
                    </td>
                    <td class="ComboHeader">
                        Description
                    </td>
                </tr>
            </table>
        </HeaderTemplate>
    </telerik:RadComboBox>
    and submitted it to Form2 using:
                Response.Redirect("Form2.aspx", True)

    In Form2 I could do something like this and get the values:
    For Each key In Request.Form.AllKeys
        If InStr(key, "cbTabDup_ClientState") > 0 Then
            Dim clsRad As New clsRadComboRequest
            clsRad.RadClientState = Request(key).ToString
            clsRad.SetValues()
     
            sDupText = clsRad.RadText
            sDupDescText = clsRad.RadDesc
            iDupInd = clsRad.RadValue
            Exit For
        End If
    Next

    Except for some unknown reason now, the Request array key containing the "cbTabDup_ClientState" is EMPTY?  Where'd it go?

  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 31 Mar 2015 Link to this post

    Hi,

    What is you use PostBackUrl instead Response.Redirect:

            <asp:Button ID="Button1" runat="server" Text="Button" Height="27px" PostBackUrl="~/Default2.aspx" OnClick="Button1_Click" />
     
    Can you access the previous page from the second form:

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.PreviousPage != null)
            {
    .....
            }
        }

    Look at the Cross-Page Posting in ASP.NET Web Forms MSDN article

    Regards,
    Hristo Valyavicharski
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top