Hi --
I have a RadGrid control with EnableHeaderContextMenu="true" on the MasterTableView. The header context menu works great on initial page load, but after a postback (caused by sorting or any other grid related event), the context menu no longer works. (After a postback, right-clicking brings up the browser's context menu instead of the RadGrid context menu.)
I do have a RadAjaxManager on my page, and this issue could be related to that.
Can someone help me figure out what I need to do to make the header context menu work after a postback? Full markup is below.
Thanks,
Rajeev
----------------------------------------
I have a RadGrid control with EnableHeaderContextMenu="true" on the MasterTableView. The header context menu works great on initial page load, but after a postback (caused by sorting or any other grid related event), the context menu no longer works. (After a postback, right-clicking brings up the browser's context menu instead of the RadGrid context menu.)
I do have a RadAjaxManager on my page, and this issue could be related to that.
Can someone help me figure out what I need to do to make the header context menu work after a postback? Full markup is below.
Thanks,
Rajeev
----------------------------------------
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="IconResultsDetailsView.ascx.cs" Inherits="OfficeUI.Controls.SearchResults.IconResultsDetailsView" %><%@ Register Src="~/Controls/SearchResults/FinalIconImagesInSearchResults.ascx" TagName="FinalIconImagesInSearchResults" TagPrefix="uc" %><telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelIconResultsDetailsView" runat="server" /><telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGridIconResults"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGridIconResults" LoadingPanelID="RadAjaxLoadingPanelIconResultsDetailsView" /> <telerik:AjaxUpdatedControl ControlID="BulkEditDialog" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="BulkEditDialog"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="BulkEditDialog" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy><telerik:RadGrid ID="RadGridIconResults" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" CssClass="RadGridIconResults GridForIconsTab" AllowMultiRowSelection="True" EnableHeaderContextMenu="True" OnItemDataBound="RadGridIconResults_ItemDataBound" OnNeedDataSource="RadGridIconResults_NeedDataSource" OnItemCreated="RadGridIconResults_ItemCreated" AutoGenerateColumns="False" PageSize="200" > <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" FirstPageImageUrl="/Images/Transparent1x1.png" LastPageImageUrl="/Images/Transparent1x1.png" PrevPageImageUrl="/Images/Transparent1x1.png" NextPageImageUrl="/Images/Transparent1x1.png" PrevPageText="< prev" NextPageText="next >" ShowPagerText="true" EnableSEOPaging="true" /> <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" Excel-Format="ExcelML" /> <ClientSettings> <Scrolling AllowScroll="false" /> <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True" EnableDragToSelectRows="False" /> </ClientSettings> <GroupingSettings CaseSensitive="false" /> <MasterTableView DataKeyNames="BugNumber" CommandItemDisplay="Top" UseAllDataFields="True" EnableHeaderContextMenu="true"> <Columns> <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderText="Select" /> <telerik:GridImageColumn HeaderText="" UniqueName="Parsed" ShowSortIcon="true" ShowFilterIcon="false" Groupable="False" AllowSorting="true" AllowFiltering="false" /> <telerik:GridBoundColumn DataField="BugNumber" HeaderText="Bug #" EmptyDataText="none" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" DataFormatString="<nobr>{0}</nobr>"> <HeaderStyle Wrap="false" /> </telerik:GridBoundColumn> </Columns> <RowIndicatorColumn> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> </MasterTableView> <ItemStyle Height="45px" BackColor="#EFF3F7" /> <AlternatingItemStyle Height="45px" /></telerik:RadGrid><telerik:RadWindow ID="BulkEditDialog" runat="server" Behaviors="Move, Close, Resize" Width="650px" Height="400px" Modal="True" Title="Review" VisibleStatusbar="False" OnClientClose="OnClientWindowClose" ></telerik:RadWindow>