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

Bug found in expand / collapse

3 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 08 Oct 2008, 06:37 PM

When using both OnUpdateCommand and ClientEvents OnCommand ,  Hierarchy expand and collapse is broken. It will only expand and collapse the first item no matter what row you try to expand. When I remove the <ClientEvents OnCommand="RaiseCommand" /> everything starts working again.

I need to use both because one does the update and the other refreshes the changes in another area.


<
telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AutoGenerateEditColumn="True" DataSourceID="SqlDataSourceMain" GridLines="None" OnUpdateCommand="UpdateCommand" Skin="Web20">

 

 

 

<ClientSettings>
<ClientEvents OnCommand="RaiseCommand" />
</ClientSettings>

Any ideas on how I can get this to work?

FULL CODE --------------

 

 

<

 

telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AutoGenerateEditColumn="True"

 

 

 

 

 

 

 

 

DataSourceID="SqlDataSourceMain" GridLines="None" OnUpdateCommand="UpdateCommand" Skin="Web20">

 

 

 

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

 

 

 

<ClientEvents OnCommand="RaiseCommand" />

 

 

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

 

 

 

<MasterTableView AutoGenerateColumns="False" DataKeyNames="Pageid" DataSourceID="SqlDataSourceMain"

 

 

 

 

 

 

 

 

EditMode="InPlace">

 

 

 

 

 

 

 

 

<DetailTables>

 

 

 

 

 

 

 

 

<telerik:GridTableView runat="server" AllowAutomaticUpdates="True" AutoGenerateColumns="False"

 

 

 

 

 

 

 

 

BorderColor="#99CCFF" DataKeyNames="Pageid" DataSourceID="SqlDataSourceSub" EditMode="InPlace"

 

 

 

 

 

 

 

 

GridLines="Both" ShowHeader="False" Name="SubMenus">

 

 

 

 

 

 

 

 

<ParentTableRelation>

 

 

 

 

 

 

 

 

<telerik:GridRelationFields DetailKeyField="Pageid" MasterKeyField="Pageid" />

 

 

 

 

 

 

 

 

</ParentTableRelation>

 

 

 

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

 

 

 

<NoRecordsTemplate>

 

 

 

 

 

 

 

 

</NoRecordsTemplate>

 

 

 

 

 

 

 

 

<ExpandCollapseColumn>

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="HitCount" HeaderText="Hit Count" ReadOnly="True"

 

 

 

 

 

 

 

 

UniqueName="HitCount">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Link" UniqueName="DirectLink">

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

<a href="javascript:directlink('<%# Eval("id") %>', '<%# Eval("mediaType") %>')">

 

 

 

 

 

 

 

 

<img src="./globalgraphics/Link.gif" alt="Direct Link" border="0" /></a>

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Pageid" HeaderText="Pageid" UniqueName="Pageid"

 

 

 

 

 

 

 

 

Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title">

 

 

 

 

 

 

 

 

<HeaderStyle Width="220px" />

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="mediaType" HeaderText="mediaType" UniqueName="mediaType"

 

 

 

 

 

 

 

 

Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridCheckBoxColumn UniqueName="MapStatus" HeaderText="MapStatus" DataField="MapStatus">

 

 

 

 

 

 

 

 

</telerik:GridCheckBoxColumn>

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

<AlternatingItemStyle BackColor="#D0DAF3" Font-Bold="False" Font-Italic="False" Font-Overline="False"

 

 

 

 

 

 

 

 

Font-Strikeout="False" Font-Underline="False" Wrap="True" />

 

 

 

 

 

 

 

 

<EditItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

 

 

 

 

 

 

Font-Underline="False" Wrap="False" />

 

 

 

 

 

 

 

 

</telerik:GridTableView>

 

 

 

 

 

 

 

 

</DetailTables>

 

 

 

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

 

 

 

<ExpandCollapseColumn Visible="True">

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="id" DataType="System.Int32" HeaderText="id" ReadOnly="True"

 

 

 

 

 

 

 

 

SortExpression="id" UniqueName="id" Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ClickCount" HeaderText="Counter" ReadOnly="True"

 

 

 

 

 

 

 

 

UniqueName="ClickCount">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="DestinationId" HeaderText="DestinationId" SortExpression="DestinationId"

 

 

 

 

 

 

 

 

UniqueName="DestinationId" Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title"

 

 

 

 

 

 

 

 

UniqueName="Title">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Pageid" HeaderText="Pageid" SortExpression="Pageid"

 

 

 

 

 

 

 

 

UniqueName="Pageid" Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="PageOrder" DataType="System.Int32" HeaderText="PageOrder"

 

 

 

 

 

 

 

 

SortExpression="PageOrder" UniqueName="PageOrder">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridCheckBoxColumn UniqueName="MapStatus" HeaderText="Map On/Off" DataField="MapStatus">

 

 

 

 

 

 

 

 

</telerik:GridCheckBoxColumn>

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

 

<FilterMenu EnableTheming="True" Skin="Web20">

 

 

 

 

 

 

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 14 Oct 2008, 07:54 AM
Hi Michele Favoretto,

Indeed you are correct in your observation. However I'm happy to inform you that our developers has addressed this issue and the fix will be available in next version of the control. Meanwhile I have updated your telerik points for reporting this.

Please excuse us for the inconvenience.

Regards,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sanele
Top achievements
Rank 1
answered on 07 Nov 2011, 08:35 AM
Hi

Has there been a solution to this problem? If yes, where can I get it from?
0
Vasil
Telerik team
answered on 08 Nov 2011, 09:10 AM
Hello Sanele,

This issue was fixed two years ago and the RadGrid should work properly since version 2008 Q3.

Greetings,
Vasil
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
Michele
Top achievements
Rank 2
Answers by
Rosen
Telerik team
Sanele
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or