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

update button text within radwindow

1 Answer 120 Views
Window
This is a migrated thread and some comments may be shown as answers.
Pat
Top achievements
Rank 1
Pat asked on 11 May 2013, 02:49 AM
 I have a RadGrid, and there is a GridTemplateColumn as below:

 <telerik:GridTemplateColumn HeaderText="Approve">
                  <ItemTemplate>
                      <asp:LinkButton ID="LinkButtonIsLinkPublish" CommandName="ShowIsPublish" Text="<span style="font-size: 14px;">Approve</span>"
                       runat="server"></asp:LinkButton>
            </ItemTemplate>
 </telerik:GridTemplateColumn>


and i have a RadWindow which has a button as below:

<telerik:RadWindow ID="RadWindowIsPublish" runat="server" Title="Approve" Width="250px"
        Height="150px" VisibleOnPageLoad="false" Behaviors="Close,Resize,Move" Left="610px">
       <ContentTemplate>
                 <table width="100%">
                    <tr>                     
      <
td align="center">
             <telerik:RadButton ID="RadWindowIsPublisRadButton" runat="server" OnClick="RadWindowButton_Onclick"
                     CommandArgument="radwindowIsPublish">
                   </telerik:RadButton>
                      </td>
                        </tr>
                  </table>
      </ContentTemplate>
  </telerik:RadWindow>


I need to set the button's text which in Radwindow base on record's status in RadGrid, but now the button's text always keep the default value, cannot change it.
Any help would be great!



1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 15 May 2013, 09:58 AM
Hello Pat,

Are you using AJAX? If your grid is performing a partial postback then the new settings for the RadButton simply will not transfer to the client. What you would need to do is to add an update panel in the ContentTemplate of the RadWindow that will wrap the button you wish to modify and call its Update() method on the server when needed. More details on the way AJAX works in this scenario are available in the how to use a RadWindow with AJAX help article.


Regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Window
Asked by
Pat
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or