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

Nested RadGrid in Radpanel not firing ItemCommand Event

10 Answers 211 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prashant
Top achievements
Rank 1
Prashant asked on 16 Aug 2010, 05:25 PM

Hey

I have a radgrid and a nested radgrid inside the radgrid. Everything works fine and I get the ItemCommand events for both of them.
But then I moved this whole thing inside a RadPanel and the the nested Radgrid does not fire the ItemCommand event anymore.

Any help would be appericiated.

 

<

 

 

 

telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%">

 

 

 

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="99%">

 

 

 

 

 

<Items>

 

 

 

 

 

<telerik:RadPanelItem Value="pnlIncidentInfo" Expanded="True" Text="Incidents Details" Font-Bold="true" Font-Size="Medium" runat="server" Selected="true">

 

 

 

 

 

<Items>

 

 

 

 

<telerik:RadPanelItem Value="pnlIDetail" runat="server">

 

 

 

<ItemTemplate>

 

 

 

<div runat="server" id="divIncidentDetail">

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="True" Width="99%"

 

 

OnItemCommand="RadGrid1_ItemCommand1" EnableViewState="true" CssClass="BasicGridViewHeader"

 

 

 

AllowMultiRowSelection="False">

 

 

 

<MasterTableView AllowMultiColumnSorting="True" GroupLoadMode="Server">

 

 

 

<NestedViewTemplate>

 

 

 

<telerik:RadGrid ID="RadGrid2" runat="server" EnableViewState="true"

 

 

 

AutoGenerateColumns="False" AllowSorting="True"

 

 

AllowMultiRowSelection="true" Width="25%" CssClass="BasicGridViewHeader"

 

 

 

OnItemCommand="RadGrid2_ItemCommand" >

 

 

 

<MasterTableView AllowMultiColumnSorting="True" GroupLoadMode="Server">

 

 

 

<NestedViewTemplate>

 

 

 

<telerik:RadGrid ID="RadGrid3" runat="server"

 

 

AutoGenerateColumns="False" AllowSorting="True"

 

 

 

AllowMultiRowSelection="true" Width="100%"

 

 

HierarchyLoadMode="ServerOnDemand">

 

 

 

<MasterTableView AllowMultiColumnSorting="True" GroupLoadMode="Server">

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Error Text" DataField="ErrorText" UniqueName="ErrorText" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 

 

 

</NestedViewTemplate>

 

 

 

<Columns>

 

 

<telerik:GridButtonColumn HeaderStyle-Font-Bold="true" CommandArgument="PageName" HeaderText="Page Name" DataTextField="PageName" UniqueName="PageName"></telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 

 

 

</NestedViewTemplate>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Document Name" DataField="DocumentName" UniqueName="DocumentName" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Status" DataField="Status" UniqueName="Status" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Due Date" DataField="LastEditDate" UniqueName="LastEditDate" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Action" DataField="Action" UniqueName="Action" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

 

</telerik:RadGrid>

 

 <

 

/div>

 

 

 

<br />

 

 

 

</ItemTemplate>

 

 

 

 

 

 

</telerik:RadPanelItem>

 

 

 

 

 

</Items>

 

 

 

</telerik:RadPanelItem>

 

 

 

 

</Items>

 

 

 

 

</telerik:RadPanelBar>

 

 

 

 

</telerik:RadAjaxPanel>

 

 

 

10 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 19 Aug 2010, 12:40 PM
Hi Prashant,

Could you please check if there is any difference when you set a CommandName for your GridButtonColumn? And from what I see, you have two nested RadGrid controls, so I am not sure which one you are talking about.

If the problem persists, it would be best if you open a formal support ticket and send us a sample runnable version of your project, so we can debug it locally and find out what causes the issue in your scenario.

Regards,
Tsvetina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 30 Aug 2010, 01:18 PM
Hello!

I take it that this is still an open issue and that I'm also facing a similar behavior. I have a RadPanelBar in which I placed several WebUserControls that were giving me isue due to complex validation groups. Although all buttons on these controls were firing properly. I had to break all the controls and place individual control for every required field. These controls include two RadGrids in two seperate RadPaneltems. For some very strange reason(s), my ASP Buttons, RadCombos, and RadGrid no longer fired the events. I had to set two of the attributes on the AP Buttons (I wish Telerik would make a RadButton) and RadCombo: CausesValidation="true" and ValidationGroup="Dummy" and the events started to fire. However, the grids are just sitting there doing nothing as the RadGrid doesn't support these two attributes.

Any kind of help will be greatly appreciated.

Thank you.
0
Prashant
Top achievements
Rank 1
answered on 30 Aug 2010, 02:38 PM
Hey we got around this problem by putting both grids in panels. Now it works like a charm.
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 30 Aug 2010, 03:26 PM
Kindly elaborate. Are you talking about the ASP Panel? I just moved one of my grid to a Web User Control and still no events firing. This is ridiculous. I really need to present this but I just cannot understand. I have followed the RadPanelBar Demo to create a wizard. Two of the steps contain a grid. I made the rest of the problematic controls to fire events by adding the ValidationGroup attribute. Weird thing is, the "Next" button used in the demo work perfectly :)

My developing has come to a grinding halt at the moment. Any help or pointers will be greatly appreciated.
0
Iana Tsolova
Telerik team
answered on 02 Sep 2010, 11:05 AM
Hello Hassan,

Infact RadGrid has a ValidationSettings section where you can either set the EnableValidation property to false or assign name to the ValidationGroup property. Can you try it out and let me know if it makes any difference?

Regards,
Iana
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 02 Sep 2010, 01:28 PM
Dear Telerik,

You are right about the ValidationSettings Section. I must have missed it. However, I used it and it was still to no avail. I have however solved the issue by using a 'for each" loop and asign a ValidationGroup to each LinkButton for the ItemCommand I'm interested in using:

protected void RadGridAddCoordinators_ItemCreated(object sender, GridItemEventArgs e) {
            if (e.Item.ItemType == GridItemType.AlternatingItem | e.Item.ItemType == GridItemType.Item) {
                GridDataItem PassedDataItem = (GridDataItem)e.Item;
 
                //For Delete Links
                LinkButton RequiredLinkButton = (LinkButton)PassedDataItem["LinkColumn"].FindControl("LinkButtonDelete");
                RequiredLinkButton.CommandArgument = e.Item.ItemIndex.ToString();
                RequiredLinkButton.ValidationGroup = "valDummy";
 
            }
        }

Wish there was some logical explanation to such behavior that has been presented by the RadPanelBar.
0
Iana Tsolova
Telerik team
answered on 03 Sep 2010, 08:20 AM
Hello Hassan,

It is great that you found a suitable workaround for your case. However we will appreciate if you can open a formal support ticket and send us a sample project for further debugging. Thus we will be able to get to the source of the problem and address it respectively.

Kind regards,
Iana
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Prateek
Top achievements
Rank 1
answered on 16 Oct 2014, 01:33 PM
Hello!!

I Have also this problem. i have a nested radgrid inside a RadPageView of RadMultiPage  of radtabstrip. RadtabStrip is inside parent RadGrid.
I want to fire ItemCommand of Nested RadGrid when click on Row and on CommandItem of Nested RadGrid. RowClick and EveryThing is working fine when clicking on Parent Row of Parent Grid. But The Problem is that Nested RdGrid is not working On RowClick and MouseHover and anyThing else..                                                              I am using seperate OnItemCommand for Both grid. 'EnablePostBackOnRowClick="true" ' is for both grids. And Nested Grid is also have RadContextMenu and OnRowDrop that is not working.... One Another Thing is that I am opening Different RadWindow on RowClick of Nested Grid in Different Conditions. ..... Any Help Will be Appreciated..   Thanks...
0
Prateek
Top achievements
Rank 1
answered on 16 Oct 2014, 01:35 PM
Hello!!

I Have also this problem. i have a nested radgrid inside a RadPageView of RadMultiPage  of radtabstrip. RadtabStrip is inside parent RadGrid.
I want to fire ItemCommand of Nested RadGrid when click on Row and on CommandItem of Nested RadGrid. RowClick and EveryThing is working fine when clicking on Parent Row of Parent Grid. But The Problem is that Nested RdGrid is not working On RowClick and MouseHover and anyThing else..                                                              I am using seperate OnItemCommand for Both grid. 'EnablePostBackOnRowClick="true" ' is for both grids. And Nested Grid is also have RadContextMenu and OnRowDrop that is not working.... One Another Thing is that I am opening Different RadWindow on RowClick of Nested Grid in Different Conditions. So How both grid can fire their OnItemCommand()..... Any Help Will be Appreciated..   Thanks...
0
Kostadin
Telerik team
answered on 21 Oct 2014, 08:43 AM
Hello Prateek,

I have already answered your question in the following forum thread, so I would suggest you to continue our conversation there and close this one.

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Prashant
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Prashant
Top achievements
Rank 1
Iana Tsolova
Telerik team
Prateek
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or