How to ajaxify a GridButtonColumn ?

2 posts, 0 answers
  1. Gotcha
    Gotcha avatar
    64 posts
    Member since:
    Sep 2009

    Posted 17 Nov 2011 Link to this post

    Hi I need to ajaxify a column in a grid in a Usercontrol... i did a search and found an example on how to achieve it but the sample was using an asp button...
    How can i achieve the same thing without the use of the asp:button

    <telerik:GridButtonColumn ButtonType="PushButton" CommandName="ViewResults" 
    FilterControlAltText="Filter ViewButton 
    Text="View Results" UniqueName="ViewButton" DataTextField="CRM_TRACKING_ID" 
    HeaderText="CRM Tracking ID"><BR></telerik:GridButtonColumn>

    Also, just to confirm, Can i still use this snippet even if mine is called from a user control with a RadAjaxManagerProxy? The AjaxManager is from my Master Template...

        protected void RadGrid1_ItemCreated(object sender, Telerik.WebControls.GridItemEventArgs e) 
            if (e.Item is GridDataItem) 
                GridDataItem item = (GridDataItem)e.Item; 
                ImageButton ImageButton1 = (ImageButton)item["TemplateColumn"].FindControl("ImageButton1"); 
                RadAjaxManager1.AjaxSettings.AddAjaxSetting(ImageButton1, TextBox1, null); 
  2. Mira
    Mira avatar
    1124 posts

    Posted 18 Nov 2011 Link to this post

    Hello Gotcha,

    You can see how functionality similar to the desired can be implemented here.
    When there is a RadAjaxManagerProxy in the usercontrol and RadAjaxManager in the page, I recommend that you add the setting to the manager:
    protected void RadGrid1_ItemCreated(object sender, Telerik.WebControls.GridItemEventArgs e)
        if (e.Item is GridDataItem)
            GridDataItem item = (GridDataItem)e.Item;
            ImageButton ImageButton1 = (ImageButton)item["TemplateColumn"].FindControl("ImageButton1");
            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(ImageButton1, TextBox1, null);
    Please examine the RadAjax and WebUserControls topic for additional information.

    I hope this helps.

    All the best,
    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
Back to Top