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

Formview updated values not displayed on the first button click

1 Answer 46 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Seema Geevarghese
Top achievements
Rank 1
Seema Geevarghese asked on 28 Jul 2011, 08:05 PM
Hello,

I have following labels (updtlbl1,updtlbl2,updtlbl3) inside a form view, They are updated by a button(btnSave) outside the formview.
I am updating the database with entity model and I am using RadAjaxmanager 


I have the code as below. Data is saved successfully at the first click of the button in the db but the updated values are not displayed in form view at the first click, On the second click the values in the formview are updated correctly

I need the updated data to be displayed in formview at the first click. Please help  


 

<P><asp:FormView runat="Server" ID=Formview1"   
><BR>    <ItemTemplate></P>
<P><table cellpadding="10" cellspacing="0" border="0" 
class="controlLabel"><BR>  
                             
<tr><BR>            
              
<BR>            
                                        
<td>                                   
<asp:Label ID="lbl1" runat="server" Text="Dis1" />:&nbsp; 
<asp:Label ID="updtlbl1" EnableViewState="true" runat="server"  
/></td                              
<td>                                   
<asp:Label ID="lbl2" runat="server" Text="Dis By" 
/>:&nbsp;<asp:Label ID="updtlbl2" runat="server"  /> 
</td>                                     
<td>                                
<asp:Label ID="lbl3" runat="server" Text="Dis Dt" 
/>:&nbsp;<asp:Label ID="updtlbl3" runat="server"  
/></td>                                
               
                       
</tr>  
                              
</table></P>
<P></ItemTemplate>   
</
asp:FormView


   
<asp:Button runat="server" Text="Save" ID="btnSave"    
                
<P><telerik:RadAjaxManager ID="RadAjaxManager1"   runat="server" 
LoadingPanelID="RadAjaxLoadingPanel1"       
<AjaxSettings>            
<telerik:AjaxSetting AjaxControlID="btnSave >          
<UpdatedControls>                    
<telerik:AjaxUpdatedControl ControlID="Formview1" />                                   
<BR>                
</UpdatedControls>                
<BR>            
</telerik:AjaxSetting>        
</AjaxSettings>    
</telerik:RadAjaxManager>

1 Answer, 1 is accepted

Sort by
0
Seema Geevarghese
Top achievements
Rank 1
answered on 28 Jul 2011, 08:28 PM
Please ignore, This is resolved, I found I had to data bind the form view, entity update couldn't reassign the values.  Thanks
Tags
Ajax
Asked by
Seema Geevarghese
Top achievements
Rank 1
Answers by
Seema Geevarghese
Top achievements
Rank 1
Share this question
or