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

contextmenu after pageswitch not showing

3 Answers 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Evers
Top achievements
Rank 2
Paul Evers asked on 13 Feb 2012, 09:06 AM
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

3 Answers, 1 is accepted

Sort by
0
Paul Evers
Top achievements
Rank 2
answered on 13 Feb 2012, 11:14 AM
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
0
Shinu
Top achievements
Rank 2
answered on 15 Feb 2012, 08:01 AM
Hello Paul,

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

-Shinu.
0
Paul Evers
Top achievements
Rank 2
answered on 21 Feb 2012, 08:34 AM
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
Tags
Grid
Asked by
Paul Evers
Top achievements
Rank 2
Answers by
Paul Evers
Top achievements
Rank 2
Shinu
Top achievements
Rank 2
Share this question
or