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

RadGrid Sorting and Expanding problems

3 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
T
Top achievements
Rank 1
T asked on 03 Sep 2012, 06:06 PM
I have following problems with hierarchical RadGrid control:

1)When I click on some column header (in order to sort according to this column), data will sort ascending. After second click on the same column, nothing will happen!

2)When I click on expand button (in order to expand DetailTableView), the DetailTableView will expand. After second click on another one expand button, new DetailTableView will expand but the original expanded DetailTableView will contract! (but when I click on the same expand button, the expanded DetailTableView will not contract). 

Simply sorting and expanding of DetailTableViews works not correctly.

Can you please help me?

----------------------------------------------------------------------------------------------------------------------------------------------------------
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="radGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid ID="radGrid" runat="server" AutoGenerateColumns="False" ShowStatusBar="true"
    AllowSorting="True" AllowPaging="True" ShowGroupPanel="false" PageSize="25" GridLines="Both"
    OnNeedDataSource="radGrid_NeedDataSource" OnDetailTableDataBind="radGrid_DetailTableDataBind">
    <MasterTableView DataKeyNames="OrderID" Name="Orders">
        <DetailTables>
            <telerik:GridTableView Name="Details" Width="100%" runat="server">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="OrderID" MasterKeyField="OrderID" />
                </ParentTableRelation>
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Emp. NO:" DataField="SocialSecurityNumber" HeaderButtonType="TextButton" />
                    <telerik:GridBoundColumn HeaderText="First name" DataField="FirstName" HeaderButtonType="TextButton" />
                    <telerik:GridBoundColumn HeaderText="Last name" DataField="LastName" HeaderButtonType="TextButton" />
                    <telerik:GridBoundColumn HeaderText="Home address" DataField="HomeAddress" HeaderButtonType="TextButton" />
                    <telerik:GridBoundColumn HeaderText="City" DataField="City" HeaderButtonType="TextButton" />
                    <telerik:GridBoundColumn HeaderText="Department" DataField="Department" HeaderButtonType="TextButton" />
                    <telerik:GridBoundColumn HeaderText="Type of card" DataField="CardType" HeaderButtonType="TextButton" />
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridBoundColumn HeaderText="Date" DataField="Date" DataFormatString="{0:dd.MM.yyyy}"
                DataType="System.DateTime" SortExpression="Date" HeaderButtonType="TextButton" />
            <telerik:GridBoundColumn HeaderText="Operation" DataField="Operation" HeaderButtonType="TextButton"
                SortExpression="Operation" />
            <telerik:GridBoundColumn HeaderText="Items / Price" DataField="Items_Price" HeaderButtonType="TextButton"
                SortExpression="Items_Price" />
            <telerik:GridBoundColumn HeaderText="Transaction owner" DataField="TransactionOwner"
                HeaderButtonType="TextButton" SortExpression="TransactionOwner" />
            <telerik:GridBoundColumn HeaderText="State" DataField="State" HeaderButtonType="TextButton"
                SortExpression="State" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 05 Sep 2012, 08:32 PM
Hello,

Did you receive any javascript errors on the page?

Greetings,
Pavlina
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.
0
T
Top achievements
Rank 1
answered on 06 Sep 2012, 06:52 AM
Hello Pavlina,

I have recieved no JavaScript errors.

But I found out, that these problems probably relates with fact, that we use this control inside KENTICO project - on control, which is derived from 'CMSAbstractWebPart'.

I have tried to use RadGrid in new empty WebSite, and in this case it works correctly.

Can you please help me? Do you have some experience with using this control in KENTICO?

Thank you. 
Thomas
   
0
Pavlina
Telerik team
answered on 10 Sep 2012, 03:33 PM
Hello,

Can you please verify that the ViewState of the Page and the RadGrid is not turned off?

All the best,
Pavlina
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
T
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
T
Top achievements
Rank 1
Share this question
or