Nested RadGrid in Radpanel not firing ItemCommand Event

11 posts, 0 answers
  1. Prashant
    Prashant avatar
    5 posts
    Member since:
    Jul 2010

    Posted 16 Aug 2010 Link to this post

    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>

     

     

     

  2. Tsvetina
    Admin
    Tsvetina avatar
    1873 posts

    Posted 19 Aug 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 30 Aug 2010 Link to this post

    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.
  5. Prashant
    Prashant avatar
    5 posts
    Member since:
    Jul 2010

    Posted 30 Aug 2010 Link to this post

    Hey we got around this problem by putting both grids in panels. Now it works like a charm.
  6. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 30 Aug 2010 Link to this post

    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.
  7. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 02 Sep 2010 Link to this post

    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
  8. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 02 Sep 2010 Link to this post

    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.
  9. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 03 Sep 2010 Link to this post

    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
  10. Prateek
    Prateek avatar
    13 posts
    Member since:
    Feb 2014

    Posted 16 Oct 2014 Link to this post

    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...
  11. Prateek
    Prateek avatar
    13 posts
    Member since:
    Feb 2014

    Posted 16 Oct 2014 Link to this post

    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...
  12. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 21 Oct 2014 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017