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

Update control on condition

1 Answer 124 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Kaushal
Top achievements
Rank 1
Kaushal asked on 17 Jan 2011, 12:45 PM
Hi ALL,

          On my web page i have RadContexMenu with two static value and after that bind from database. On same page i have one RadGrid.

          When user click on any of the static value then i dont want to update RadGrid, but when user try to select any value which bind from database on ContextMenu then i have to update my RadGrid.
 
          I had used AjaxLoadingPanel also, which would be affect only when user select any value which bind from database on ContexMenu.

          Please help me.

Here i am defining my code.

  
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
        ClientEvents-OnRequestStart="RequestStart" ClientEvents-OnResponseEnd="ResponseEnd">
  <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="FavouritesMenu">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="FavouritesMenu" />
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    <telerik:AjaxUpdatedControl ControlID="StatusBarLabel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
   </AjaxSettings>
</telerik:RadAjaxManager>
 
 <telerik:RadContextMenu ID="Menu" runat="server"
                            DefaultGroupSettings-OffsetX="500" Flow="Vertical" OnItemClick="Menu_ItemClick"
                            Skin="Office2007">
                            <Items>
                                <telerik:RadMenuItem
                                     
                                    Text="Add" Value="Add">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem
                                    Style="left: 790px; top: 130px"
                                    Text="Remove" Value="Remove">
                                </telerik:RadMenuItem>
                            </Items>
                            <ExpandAnimation Type="None" />
                            <CollapseAnimation Type="None" />
                        </telerik:RadContextMenu>
 <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
                                    enableajax="true" ShowGroupPanel="True" Width="100%" AllowSorting="True" AllowMultiRowSelection="True"
                                    OnCreateColumnEditor="RadGrid1_CreateColumnEditor" Height="100%" Skin="Vista"
                                    OnUpdateCommand="RadGrid1_UpdateCommand" OnDeleteCommand="RadGrid1_DeleteCommand"
                                    OnItemDataBound="RadGrid1_ItemDataBound" ClientSettings-ClientEvents-OnRowSelecting="RestrictSelect"
                                    PageSize="50" AllowCustomPaging="True" AllowPaging="true"> </telerik:RadGrid>

        

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 17 Jan 2011, 05:11 PM
Hello Kaushal,

The described approach could not be implemented using RadAjaxManager control as you should set the whole RadContextMenu control to update the RadGrid no matter of the chosen items. You could try implement you own custom logic to check what exactly item is chosen and initiate Ajax request explicitly.

All the best,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start 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.
Tags
Ajax
Asked by
Kaushal
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or