Exclude RadGrid Column from ajaxifying

8 posts, 0 answers
  1. Smiely
    Smiely avatar
    129 posts
    Member since:
    Nov 2010

    Posted 06 Dec 2010 Link to this post

    Hi,

    I have a RadGrid and a RadComboBox. For one Command Item click I am using AJAX to update RadComboBox. So I have linked RadGrid and RadCombobox using AJAX Manager from Design view(Configure AJAX Manager).

    My RadGrid has Edit , Delete Reset function which has no connection to RadCombobox. Whenever I click anyone it updated RadComcbox too. How can I solve this problem ?

    Please Help...
  2. Smiely
    Smiely avatar
    129 posts
    Member since:
    Nov 2010

    Posted 07 Dec 2010 Link to this post

    To be specific....I want following code to work only for one Command item click, not for all items

    <telerik:AjaxSetting AjaxControlID="crewRadGrid">
            <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="RadComboBox2" 
                           LoadingPanelID="RadAjaxLoadingPanel"   />                 
             </UpdatedControls>
    </telerik:AjaxSetting>
  3. Smiely
    Smiely avatar
    129 posts
    Member since:
    Nov 2010

    Posted 08 Dec 2010 Link to this post

    Anybody.....
  4. Smiely
    Smiely avatar
    129 posts
    Member since:
    Nov 2010

    Posted 08 Dec 2010 Link to this post

    Telerik ?....
  5. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 09 Dec 2010 Link to this post

    Hi Smiely,

    Check out this online demo on how to achieve partial ajaxification with RadAjaxManager. Following it, you should be able to add dynamic ajax setting specifying the particular command button but the grid to update the RadComboBox.

    Kind regards,
    Iana
    the Telerik team
    Browse the vast support resources we have to jumpstart 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.
  6. Smiely
    Smiely avatar
    129 posts
    Member since:
    Nov 2010

    Posted 09 Dec 2010 Link to this post

    Thanks lana for replying. I went thro' the example. Got an idea how to do it. Now how do I access Command Item from radGrid
    protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem dataItem = e.Item as GridDataItem;
                    ImageButton ibtnAddToCart = (ImageButton)(dataItem["TemplateColumn1"]).FindControl("ibtnAddToCart");
                    RadAjaxManager1.AjaxSettings.AddAjaxSetting(ibtnAddToCart, RadGrid2); //ajaxify the button
                }
            }
    So instead of "(dataItem["TeplateColumn1"].FindControl("ibtnAddToCart");" What should I use ?

    LinkButton btnOwnership = (LinkButton)(dataItem["CommandItem"]).FindControl("LinkButton2");
    IS NOT WORKING.

    Please help....

  7. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 09 Dec 2010 Link to this post

    Hello Smiely,

    If you're using the GridButtonColumn, you can access the button like so:

    LinkButton btnOwnership = ((LinkButton)dataItem["CommandItem"]).Controls[0];

    It's first control in the collection for the column.

    I hope that helps.
  8. Smiely
    Smiely avatar
    129 posts
    Member since:
    Nov 2010

    Posted 10 Dec 2010 Link to this post

    It worked !!!!!!!!!!! Thanks Cori !!
Back to Top