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

Easy ?: Server Needs Label Changed Client Side

1 Answer 37 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 06 Feb 2012, 11:45 PM
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

1 Answer, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 07 Feb 2012, 02:17 AM
Sorry, been a long day programming.  I will just use a hidden field instead of a label.

Thanks,

Jim
Tags
Ajax
Asked by
James
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Share this question
or