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

Where did the RadComboBox ClientState data go?

1 Answer 87 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
SSirica asked on 26 Mar 2015, 03:23 PM
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?

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 31 Mar 2015, 01:51 PM
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.

 
Tags
ComboBox
Asked by
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or