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

Exclude Ajaxified control (LinkButton) within a radgrid

2 Answers 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aret
Top achievements
Rank 1
Aret asked on 09 Aug 2012, 03:51 AM
I have a control within a RadGrid that is ajaxified using this code within the radajaxmanager.....

<radA:RadAjaxManager runat="server" ID="radAjax" DefaultLoadingPanelID="AjaxLoadingPanel1" >
  <
AjaxSettings>
        <rada:AjaxSetting AjaxControlID="RadGrid_NoReferrals">           
            <
UpdatedControls>
                  <rada:AjaxUpdatedControl ControlID="RadGrid_NoReferrals" />
             </
UpdatedControls>
         </
rada:AjaxSetting>
  </AjaxSettings>
</
radA:RadAjaxManager>


This will ajaxify every control within the radgrid, but I want one particular control (which is a Linkbutton) within the "radgrid_NoReferrals" to be excluded from the ajax and do a FULL postback when the linkbutton is clicked.  How would I go about doing this......


2 Answers, 1 is accepted

Sort by
0
Aret
Top achievements
Rank 1
answered on 09 Aug 2012, 04:35 AM
I have done research and I have tried the code below, but it crashes at the Bold Part of the code.  I know I am getting close
 
Protected Sub RadGrid_NoReferrals_ItemCreated(ByVal sender As Object, ByVal e As Telerik.WebControls.GridItemEventArgs) Handles RadGrid_NoReferrals.ItemCreated

       If TypeOf e.Item Is GridDataItem Then
            Dim dataItem As GridDataItem = TryCast(e.Item, GridDataItem)
            Dim btnCovering As LinkButton = DirectCast((dataItem("Covering")).FindControl("btnCovering"), LinkButton)
            btnCovering.OnClientClick = String.Format("{0}.__doPostBack(""{1}"",""{2}"");return false;", radAjax.ClientID, btnCovering.UniqueID, btnCovering.CommandArgument)
        End If
End Sub
0
Eyup
Telerik team
answered on 13 Aug 2012, 08:12 AM
Hello Aret,

For excluding controls from ajaxification please check out the following topics:
Force Controls in Ajaxified Container to Perform PostBack
Exclude Controls from Ajaxifying

I hope this will prove helpful.

Greetings,
Eyup
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
Grid
Asked by
Aret
Top achievements
Rank 1
Answers by
Aret
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or