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>
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>