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

Problem with Ajax and disabled fields

3 Answers 229 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ngoc
Top achievements
Rank 1
Ngoc asked on 24 Jul 2009, 01:04 AM
By default, ASP.Net form submission will not pass back disabled field during postback.  To get around this, we can set the form property "submitdisabledcontrols" to true and it will pass back the value of a disabled field.  However I am having a problem with an Ajax postback as it does not contain the updated value of a disable field.

For example, I have a disabled checkbox when the form load.  Through javascript, I enable the checkbox.  Then I fire an event that makes an Ajax call to lookup a value.  The Ajax call does a server side postback but the state of the checkbox is disabled.

Please help.  Thanks.

3 Answers, 1 is accepted

Sort by
0
SamJ
Top achievements
Rank 1
answered on 25 Jul 2009, 04:24 PM
Hi,

I was able to replicate without ajax as well. I am afraid that changes performed with javascript on the controls are always lost after postback and this sounds expected to me. I don't think the CheckBox is of the controls that persist their client state after postback.

SamJ
0
Jeff
Top achievements
Rank 1
answered on 31 Jan 2011, 07:13 AM
Just wanted to bump this one up and see if the Telerik developers had any thoughts on it. We have an app with checkboxes in a Telerik RadGrid and they are losing their values on Postback.
0
Iana Tsolova
Telerik team
answered on 31 Jan 2011, 05:04 PM
Hi Jeff,

Can you elaborate a bit on your scenario? Are you changing the checboxes atate manually? And is it lost after rebind or regualr postback?

Greetings,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Ajax
Asked by
Ngoc
Top achievements
Rank 1
Answers by
SamJ
Top achievements
Rank 1
Jeff
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or