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

How to set a hidden value field from a control event in a Grid

1 Answer 200 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jaime
Top achievements
Rank 1
Jaime asked on 04 Oct 2010, 07:18 PM
Hello...

I have a Grid whose columns contains controls, for example, a RadMasketTextBox control. I implemented the TextChanged of that control to set the value of a hidden field to "true".

The problem is that I want to read that hidden field from a JavaScript. Is it possible to do it? I tried with RadAjaxManager, with this settings:

<rad:RadAjaxManager ID="ajaxManager" runat="server">
    <AjaxSettings>
        <rad:AjaxSetting AjaxControlID="gdvPeriodos">
            <UpdatedControls>
                <rad:AjaxUpdatedControl ControlID="gdvPeriodos" />
                <rad:AjaxUpdatedControl ControlID="hidModificado" />
            </UpdatedControls>
        </rad:AjaxSetting>
    </AjaxSettings>
</rad:RadAjaxManager>
<asp:HiddenField ID="hidModificado" Value="false" runat="server" />

When the JavaScript function executed the following command:
var serverModifiedFlag = eval(document.getElementById('hidModificado').value);
always "false" is returned, even when I modify the hidden value from a Grid event in codebehind.

Any help will be appreciated
Thanks

Jaime


1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 08 Oct 2010, 08:37 AM
Hi Jaime,

Please note that it is not supported scenario to add invisible controls into RadAjaxManager settings. Note that all controls added as Ajax initiators or target controls would be always visible on the page. Therefore I would suggest you to wrap the hidden input into always visible container and add this container in the AjaxManager settings.  


Regards,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Jaime
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or