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

Cannot remove pager from RadGrid

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
pawelg
Top achievements
Rank 1
pawelg asked on 13 Sep 2012, 09:01 AM
Hello again,
This time I've encountered a problem with RadGrid.

I have following grid:

<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <telerik:RadGrid ID="UserGrid" runat="server" Culture="pl-PL" AutoGenerateColumns="False" PageSize="100"
        CellSpacing="0" GridLines="None" OnNeedDataSource="UserGrid_NeedDataSource"
        AllowCustomPaging="True"
        AllowFilteringByColumn="True" AllowSorting="True" EnableLinqExpressions="False"
        EnableHeaderContextMenu="True" OnInsertCommand="UserGrid_InsertCommand" OnUpdateCommand="UserGrid_UpdateCommand"
        OnItemDataBound="RadGrid1_ItemDataBound" GroupingEnabled="False">
        <mastertableview allowcustompaging="true" allowpaging="true" datakeynames="Id"
            pagerstyle-alwaysvisible="true" EditMode="InPlace" CommandItemDisplay="Top"  >
 
        <Columns>
            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"
                HeaderStyle-Width="56px" Resizable="false">
                <HeaderStyle Width="56px"></HeaderStyle>
                <ItemStyle CssClass="MyImageButton" />
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn HeaderText="lblName"
                UniqueName="Name" DataField="Name" >
            </telerik:GridBoundColumn>
            <telerik:GridDropDownColumn HeaderText="lblType" ColumnEditorID="GridDropDownColumnEditor1">
            </telerik:GridDropDownColumn>
        </Columns>
   </mastertableview>
 
</telerik:RadGrid>
<telerik:GridDropDownListColumnEditor ID="GridDropDownColumnEditor1" runat="server" />
</ContentTemplate>
 
</asp:UpdatePanel>

I'd like to hide/remove pager, so I try to remove pagerstyle-alwaysvisible property or to set it to false, the grid is rendered correctly and the pager is not shown. But whenever I try to edit a row, a javascript error is shown:

Sys.ArgumentUndefinedException: Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: type
{name: "element", mayBeNull: true, domElement: true, optional: true}

As a result, DropDownList is disabled (I cannot open the list).

What can be the reason of this strange behaviour? In other pages I just removed all the properties associated with pager/paging and it works fine, but I didn't use GridDropDownListColumnEditor there, so no errors occured.

My web application is being developed using .NET 3.5 and Sharepoint 2010.

Thank you in advance,
Paweł


Edit: I've just noticed that removing allowcustompaging="true" allowpaging="true" properties causes the same problem.

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 18 Sep 2012, 06:57 AM
Hi,

The reason why the dropdown could not be opened is because of the JavaScript that is raised. However, based on the provided code it is too hard to find the source of issue. Could you post your full page source code along with the code-behind file? Thus all the people who want to help you will have better understanding of your case.

Greetings,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
pawelg
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or