Easy ?: Server Needs Label Changed Client Side

2 posts, 0 answers
  1. James
    James avatar
    55 posts
    Member since:
    Oct 2011

    Posted 06 Feb 2012 Link to this post

    I think this is an easy question, and I'm a little perplexed that I am having a problem with it.  Here is the issue:

    This code grabs the DataKeyValue from a RadGrid row onRowMouseOver with no problem:

    function onRowMouseOver(sender, eventArgs) {
        var rowID = eventArgs.getDataKeyValue("PartyExperienceID");
        document.getElementById("<%= HiddenLabel.ClientID %>").innerHTML = rowID;
    }  

    Works like a dream.  Now, I want to grab the changed HiddenLabel value server side (any way is fine, even a button click).  I can see that the label has changed on the page, but the server cannot see the change.  I'm wondering if I can solve the problem via RadAjaxManager.  Here is my current config:

    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="HiddenLabel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="HiddenLabel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    Any other ideas?   I feel I am missing something obvious (not a JS guy).

    Thanks so much!

    Jim
  2. James
    James avatar
    55 posts
    Member since:
    Oct 2011

    Posted 06 Feb 2012 Link to this post

    Sorry, been a long day programming.  I will just use a hidden field instead of a label.

    Thanks,

    Jim
Back to Top