contextmenu after pageswitch not showing

4 posts, 0 answers
  1. Paul Evers
    Paul Evers avatar
    52 posts
    Member since:
    Oct 2011

    Posted 13 Feb 2012 Link to this post

    Hi,

    I have a RadGrid headercontextmenu enabled and resizing and moving of columns set to true.
    When I show the grid these functions are working correct. When I switch to another page of the grid the contextmenu does not appear and I can't move of resize a column.
    How can I solve this problem?


    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="EntityDataSourceChangeLog"
        AllowPaging="True" AllowSorting="True" GridLines="None" CellSpacing="0" EnableHeaderContextMenu="True"
        AllowFilteringByColumn="True" EnableHeaderContextFilterMenu="True" AutoGenerateColumns="False"
        OnItemCommand="RadGrid1_ItemCommand" Width="100%">
        <MasterTableView DataSourceID="EntityDataSourceChangeLog" IsFilterItemExpanded="false"
            DataKeyNames="LogId" UseAllDataFields="True">
            <Columns>
                <telerik:GridBoundColumn DataField="ProjectName" HeaderText="Project" SortExpression="ProjectName"
                    UniqueName="ProjectName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="UserName" HeaderText="User" SortExpression="UserName"
                    UniqueName="UserName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LogMessage" HeaderText="Log Message" SortExpression="LogMessage"
                    UniqueName="LogMessage">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LogTime" HeaderText="DateTime" SortExpression="LogTime"
                    UniqueName="LogTime">
                </telerik:GridBoundColumn>
            </Columns>
            <PagerStyle AlwaysVisible="True"></PagerStyle>
        </MasterTableView>
        <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder">
            <Scrolling UseStaticHeaders="true" AllowScroll="false" />
            <Animation AllowColumnReorderAnimation="false" />
            <Resizing AllowColumnResize="true" AllowResizeToFit="true" EnableRealTimeResize="true"
                ResizeGridOnColumnResize="true" />
        </ClientSettings>
        <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />
        <FilterMenu EnableTheming="true">
            <CollapseAnimation Duration="200" Type="InOutQuint" />
        </FilterMenu>
        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true"
            FileName="FlightMapChangelogExport" Excel-Format="ExcelML">
            <Excel Format="ExcelML"></Excel>
        </ExportSettings>
    </telerik:RadGrid>


    Paul
  2. Paul Evers
    Paul Evers avatar
    52 posts
    Member since:
    Oct 2011

    Posted 13 Feb 2012 Link to this post

    Update:

    I have added the grid to UpdatedControls of RadAjaxManager:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

    When I delete this the contextmenu and the reordering/resizing of columns works normally when I switch between pages in the grid.
    Why is this not working when addeing the grid to the UpdateControls?

    Paul
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 15 Feb 2012 Link to this post

    Hello Paul,

    Take a look at the following demo.
    Grid / Header Context Menu

    -Shinu.
  5. Paul Evers
    Paul Evers avatar
    52 posts
    Member since:
    Oct 2011

    Posted 21 Feb 2012 Link to this post

    I have solved the problem.
    I had the grid in a usercontrol. The RadAjaxManager was also in that usercontrol.
    When I moved the RadAjaxManager to the form where the usercontrol was called from the contextmenu is working correctly.

    Paul
Back to Top