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

Filtering or grouping grid gives an empty page

2 Answers 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Iron
Al asked on 27 May 2015, 11:41 AM

Hi,

I have a grid with the definition below, DataSource is set to a DataTable in NeedDataSoruce & the grid shows up fine. When Dragging a column to the group area or selecting a filter then the grid disappears, what could be the problem?

<telerik:RadGrid ID="RadGrid1" runat="server" Height="99%" OnNeedDataSource="RadGrid1_NeedDataSource1" CssClass="startInvisible" 
    AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" GroupPanelPosition="Top" ShowGroupPanel="True"
    AllowMultiRowSelection="True" OnColumnCreated="RadGrid1_ColumnCreated" OnPreRender="RadGrid1_PreRender">
    <ClientSettings AllowDragToGroup="True" >
        <Selecting AllowRowSelect="True" />
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        <Resizing AllowColumnResize="True" AllowResizeToFit="True" ResizeGridOnColumnResize="true" />
        <ClientEvents OnGridCreated="GridCreated" />
    </ClientSettings>
    <MasterTableView >
        <RowIndicatorColumn Visible="False">
        </RowIndicatorColumn>
        <Columns>
            <telerik:GridClientSelectColumn FilterControlAltText="Filter ClientSelectColumn column" UniqueName="ClientSelectColumn">
            </telerik:GridClientSelectColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

2 Answers, 1 is accepted

Sort by
0
Al
Top achievements
Rank 1
Iron
Iron
Iron
answered on 27 May 2015, 11:48 AM
I see now the problem is due to my css startInvisible where the grid is initially invisible and then resized and made visible in document.ready.
0
Konstantin Dikov
Telerik team
answered on 29 May 2015, 01:12 PM
Hi Al,

If you have enabled AJAX for your RadGrid, you need to handle the client-side pageLoad event for changing the visibility of your grid:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function pageLoad() {
            var grid = $find("<%=RadGrid1.ClientID%>");
            grid.get_element().className = grid.get_element().className.replace("startInvisible", "");
        }
    </script>
</telerik:RadCodeBlock>
 
<telerik:RadAjaxPanel runat="server">
    <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" CssClass="startInvisible" ShowGroupPanel="true">
        <ClientSettings AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
    </telerik:RadGrid>
</telerik:RadAjaxPanel>



Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Konstantin Dikov
Telerik team
Share this question
or