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

[Solved] With multiple grids on one aspx page, how to get second and third grids to update

3 Answers 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shannon
Top achievements
Rank 1
Shannon asked on 09 Sep 2009, 05:29 PM
I have three grids on one aspx page.  The second and third grids are dependant upon the first grid (in that each time the selected row changes for the first grid, the second and third grids data changes).  The selected values are able to change correctly on all grids, however when trying to edit or insert an item into the second or third grid, the grids disappear and i can't get into any of the events to debug.  Here's the problematic aspx page:

 <h3>Media</h3>

    <asp:Label ID="lblErrorMessage" ForeColor="Red" runat="server" />

    <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True"

        AllowSorting="True" AllowFilteringByColumn="False" OnPreRender="RadGrid1_PreRender"

        OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"

        OnInsertCommand="RadGrid1_InsertCommand" OnDeleteCommand="RadGrid1_DeleteCommand"

        PageSize="5" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged">

        <MasterTableView Width="100%" EditMode="PopUp" DataKeyNames="CleanupUnitAffectedMediaId"

            CommandItemDisplay="Top" AutoGenerateColumns="false" EditFormSettings-PopUpSettings-Width="50%">

            <EditFormSettings UserControlName="CleanupUnitMediaUC.ascx" EditFormType="WebUserControl"

                PopUpSettings-Modal="true">

                <EditColumn UniqueName="EditCommandColumn1">

                </EditColumn>

                <FormTemplate>

                    <uc1:Media ID="Media" runat="server" />

                </FormTemplate>

                <PopUpSettings Modal="True"></PopUpSettings>

            </EditFormSettings>

            <RowIndicatorColumn>

                <HeaderStyle Width="20px"></HeaderStyle>

            </RowIndicatorColumn>

            <ExpandCollapseColumn>

                <HeaderStyle Width="20px"></HeaderStyle>

            </ExpandCollapseColumn>

            <Columns>

                <telerik:GridButtonColumn Text="Select" CommandName="Select" />

                <telerik:GridBoundColumn DataField="CleanupUnitAffectedMediaType.CleanupUnitAffectedMediaTypeDisplayName"

                    HeaderText="Media" ReadOnly="True" SortExpression="CleanupUnitAffectedMediaTypeId"

                    UniqueName="CleanupUnitAffectedMediaTypeId">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CleanupUnitMediaContaminantStatusType.CleanupUnitMediaContaminantStatusTypeDisplayName"

                    HeaderText="Status" ReadOnly="True" SortExpression="CleanupUnitMediaContaminantStatusTypeId"

                    UniqueName="CleanupUnitMediaContaminantStatusTypeId">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CleanupUnitMethodType.CleanupUnitMethodTypeDisplayName"

                    HeaderText="Method" ReadOnly="True" SortExpression="CleanupUnitMethodTypeId"

                    UniqueName="CleanupUnitMethodTypeId">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CleanupUnitDrinkingWaterUseType.CleanupUnitDrinkingWaterUseTypeDisplayName"

                    HeaderText="Drinking Water" ReadOnly="True" SortExpression="CleanupUnitDrinkingWaterUseTypeId"

                    UniqueName="CleanupUnitDrinkingWaterUseTypeId">

                </telerik:GridBoundColumn>

                <telerik:GridEditCommandColumn />

                <telerik:GridClientDeleteColumn />

            </Columns>

        </MasterTableView>

    </telerik:RadGrid>

   

     <h3><u>Media Details</u></h3>

     <h4>Contaminant</h4>

    <telerik:RadGrid ID="RadGrid2" runat="server" GridLines="None" AllowPaging="True"

        AllowSorting="True" AllowFilteringByColumn="False" OnPreRender="RadGrid2_PreRender"

        OnNeedDataSource="RadGrid2_NeedDataSource" OnUpdateCommand="RadGrid2_UpdateCommand"

        OnInsertCommand="RadGrid2_InsertCommand" OnDeleteCommand="RadGrid2_DeleteCommand"

        PageSize="3" OnSelectedIndexChanged="RadGrid2_SelectedIndexChanged">

        <MasterTableView Width="100%" EditMode="PopUp" DataKeyNames="CleanupUnitContaminantId"

            CommandItemDisplay="Top" AutoGenerateColumns="false" EditFormSettings-PopUpSettings-Width="50%">

            <EditFormSettings UserControlName="CleanupUnitContaminantUC.ascx" EditFormType="WebUserControl"

                PopUpSettings-Modal="true">

                <EditColumn UniqueName="EditCommandColumn2">

                </EditColumn>

                <FormTemplate>

                    <uc1:Contaminant ID="Contaminant" runat="server" />

                </FormTemplate>

                <PopUpSettings Modal="True"></PopUpSettings>

            </EditFormSettings>

            <RowIndicatorColumn>

                <HeaderStyle Width="20px"></HeaderStyle>

            </RowIndicatorColumn>

            <ExpandCollapseColumn>

                <HeaderStyle Width="20px"></HeaderStyle>

            </ExpandCollapseColumn>

            <Columns>

                <telerik:GridButtonColumn Text="Select" CommandName="Select" />

                <telerik:GridBoundColumn DataField="CleanupUnitContaminantType.CleanupUnitContaminantTypeDisplayName"

                    HeaderText="Contaminant" ReadOnly="True" SortExpression="CleanupUnitContaminantTypeId"

                    UniqueName="CleanupUnitContaminantTypeId">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CleanupUnitMediaContaminantStatusType.CleanupUnitMediaContaminantStatusTypeDisplayName"

                    HeaderText="Status" ReadOnly="True" SortExpression="CleanupUnitMediaContaminantStatusTypeId"

                    UniqueName="CleanupUnitMediaContaminantStatusTypeId">

                </telerik:GridBoundColumn>

                <telerik:GridEditCommandColumn />

                <telerik:GridClientDeleteColumn />

            </Columns>

        </MasterTableView>

    </telerik:RadGrid>

   

     <h4>Technology</h4>

    <telerik:RadGrid ID="RadGrid3" runat="server" GridLines="None" AllowPaging="True"

        AllowSorting="True" AllowFilteringByColumn="False" OnPreRender="RadGrid3_PreRender"

        OnNeedDataSource="RadGrid3_NeedDataSource" OnUpdateCommand="RadGrid3_UpdateCommand"

        OnInsertCommand="RadGrid3_InsertCommand" OnDeleteCommand="RadGrid3_DeleteCommand"

        PageSize="3" OnSelectedIndexChanged="RadGrid3_SelectedIndexChanged">

        <MasterTableView Width="100%" EditMode="PopUp" DataKeyNames="CleanupUnitTechnologyId"

            CommandItemDisplay="Top" AutoGenerateColumns="false" EditFormSettings-PopUpSettings-Width="50%">

            <EditFormSettings UserControlName="CleanupUnitTechnologyUC.ascx" EditFormType="WebUserControl"

                PopUpSettings-Modal="true">

                <EditColumn UniqueName="EditCommandColumn1">

                </EditColumn>

                <FormTemplate>

                    <uc1:Technology ID="Technology" runat="server" />

                </FormTemplate>

                <PopUpSettings Modal="True"></PopUpSettings>

            </EditFormSettings>

            <RowIndicatorColumn>

                <HeaderStyle Width="20px"></HeaderStyle>

            </RowIndicatorColumn>

            <ExpandCollapseColumn>

                <HeaderStyle Width="20px"></HeaderStyle>

            </ExpandCollapseColumn>

            <Columns>

                <telerik:GridButtonColumn Text="Select" CommandName="Select" />

                <telerik:GridBoundColumn DataField="CleanupUnitTechnologyType.CleanupUnitTechnologyTypeDisplayName"

                    HeaderText="Technology" ReadOnly="True" SortExpression="CleanupUnitTechnologyTypeId"

                    UniqueName="CleanupUnitTechnologyTypeId">

                </telerik:GridBoundColumn>

                 <telerik:GridBoundColumn DataField="CommentDescription" HeaderText="Comments"

                    ReadOnly="True" SortExpression="CommentDescription" UniqueName="CommentDescription"

                    DataType="System.String">

                </telerik:GridBoundColumn>

                <telerik:GridEditCommandColumn />

                <telerik:GridClientDeleteColumn />

            </Columns>

        </MasterTableView>

    </telerik:RadGrid>

3 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 11 Sep 2009, 11:56 AM
Hello Shannon,

Do you have a RadAjaxManager on your page?

If you have one, please try adding to its settings the settings required to perform edit/update/delete/insert operations in RadGrid using an external form as shown in the Editing with external form demo.

Regards,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Steele
Top achievements
Rank 1
answered on 30 Nov 2009, 03:28 AM
Hi Shannon,
Did you work out the issue?
I am having a very similar issue, but in IE only (firefox works great!).
Steele.
0
Mira
Telerik team
answered on 02 Dec 2009, 10:08 AM
Hi Steele,

Could you please provide more detailed explanation of the issue you are facing and if possible, some code (a sample project will be appreciated), so that we can assist you further?

I am looking forward to your reply.

Greetings,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Shannon
Top achievements
Rank 1
Answers by
Mira
Telerik team
Steele
Top achievements
Rank 1
Share this question
or