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

Show edit form by grouping the data

12 Answers 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hiram
Top achievements
Rank 1
Hiram asked on 08 Jan 2010, 09:41 AM
Hello

I have a RadGrid with one Group. The data is seperated by the groups in a proper way.
So from this point everything is ok.

Data should be added by an edit form (modal popup).
Now I try to display the edit form, but it's just appearing if I press "Add new record".
Pressing "Edit" in a row does not show the edit form.

If remove the grouping of the RadGrid, the edit form appears as expected!

What's the reason for this behaviour?

Here is my code:

    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">  
    </asp:ScriptManagerProxy> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="gridMain">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gridMain" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="imgSearch" /> 
 
               </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="imgSearch">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gridMain" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Center" 
        Skin="Vista" /> 
 <telerik:RadGrid runat="server" ID="gridMain" Width="50%" Style="margin-left: auto;  
            margin-right: auto; margin-top: 5px"> 
            <ClientSettings> 
                <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
            </ClientSettings> 
            <GroupingSettings /> 
            <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top" AllowPaging="true" 
                DataKeyNames="BMID" GroupsDefaultExpanded="false" PageSize="100" EditMode="PopUp" GroupLoadMode="Server">  
                <GroupByExpressions> 
                    <telerik:GridGroupByExpression> 
                        <GroupByFields> 
                            <telerik:GridGroupByField FieldName="BMITEM" FieldAlias="Item" /> 
                        </GroupByFields> 
                        <SelectFields> 
                            <telerik:GridGroupByField FieldName="BMITEM" FieldAlias="Item" /> 
                        </SelectFields> 
                    </telerik:GridGroupByExpression> 
                </GroupByExpressions> 
                  
                <Columns> 
                    <telerik:GridEditCommandColumn> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn HeaderText="Status" DataField="BMSTAT">  
                        <HeaderStyle Width="25px" /> 
                        <ItemStyle Width="25px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Seq." DataField="BMSEQN">  
                        <HeaderStyle Width="25px" /> 
                        <ItemStyle Width="25px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Child item" DataField="BMCHLD">  
                        <HeaderStyle Width="150px" /> 
                        <ItemStyle Width="150px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Description">  
                        <HeaderStyle Width="150px" /> 
                        <ItemStyle Width="150px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Quantity" DataField="BMQTY">  
                        <HeaderStyle Width="25px" /> 
                        <ItemStyle Width="25px" /> 
                    </telerik:GridBoundColumn> 
                </Columns> 
                <EditFormSettings EditFormType="Template" InsertCaption="Add new BOM entry" CaptionFormatString="Edit item {0}" 
                    CaptionDataField="BMID">  
                    <PopUpSettings Modal="true" /> 
                    <FormTemplate> 
                        <table> 
                            <tr> 
                                <td> 
                                    Status  
                                </td> 
                                <td class="cellWithTextBox">  
                                    <asp:DropDownList ID="ddlStatus" runat="server">  
                                        <asp:ListItem Value="A">Active</asp:ListItem> 
                                        <asp:ListItem Value="D">Disabled</asp:ListItem> 
                                        <asp:ListItem Value="Z">Deleted</asp:ListItem> 
                                    </asp:DropDownList> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="center" colspan="4">  
                                    <asp:Button ID="btnUpdate" Text='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Insert" : "Update" %>' 
                                        runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>'>  
                                    </asp:Button>&nbsp;  
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                                        CommandName="Cancel" /> 
                                </td> 
                            </tr> 
                        </table> 
                    </FormTemplate> 
                </EditFormSettings> 
            </MasterTableView> 
        </telerik:RadGrid> 
   
 
 

        protected void gridMain_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            LJITDataContext db = new LJITDataContext();  
            IQueryable<LJT_BOM> parts;  
              
            var conditions = PredicateBuilder.True<LJT_BOM>();  
 
            int startRowIndex = this.gridMain.CurrentPageIndex * this.gridMain.PageSize;  
            int maximumRows = this.gridMain.PageSize;  
            conditions = conditions.And(p => p.BMITEM.Contains(this.txtFindName.Text));  
            conditions = conditions.And(p => p.BMCHLD.Contains(this.txtFindChild.Text.Trim()));  
            parts = db.BOM.Where(conditions).OrderBy(o => o.BMITEM).ThenBy(o => o.BMSEQN);  
 
            this.gridMain.VirtualItemCount = parts.Count();  
            var alles = parts.Skip(startRowIndex).Take(maximumRows);  
            this.gridMain.DataSource = parts;  

12 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 13 Jan 2010, 10:27 AM
Hello Aho,

I reviewed the setup, and the code looks correct.
If the issue persists, you can open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior.
We will debug it locally, and advise you further.

Best wishes,
Yavor
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
CH
Top achievements
Rank 1
answered on 20 Jan 2010, 03:28 AM
I go the same behaviour as well.... edit popup form template is not appear after grouping. is there any solution work out?

Thks

Edmond
0
Hiram
Top achievements
Rank 1
answered on 20 Jan 2010, 07:17 AM
I was wondering that I am the only one how runs into this issue.

It seems that this is a problem with the RadGrid itself.
As far as I know, there still isn't a workaround for this.
0
CH
Top achievements
Rank 1
answered on 20 Jan 2010, 04:17 PM
AHo:
   I don't think you are the only one..... it seems the bug for telerik grid. i tried the grid in the other application. the problem also appear. if there is not further feedback then i will submit a support ticket tomorrow.... if you can find some workaround then please kindly to let me know to. thks 
0
Yavor
Telerik team
answered on 22 Jan 2010, 11:52 AM
Hi CH,

It is very important that we replicate the precise settings, which demonstrate this behavior.
Attached to this message, you will find a small project, which handles a similar setup, and behaves as expected.
You can either use it to introduce any additional settings, which replicate the issue, or open a formal support ticket, and send a separate project.

Kind regards,
Yavor
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
Hiram
Top achievements
Rank 1
answered on 22 Jan 2010, 01:24 PM
Hi Yavor

Can you confirm, that your example does not work if you set the MasterTableView property:

 

GroupsDefaultExpanded="false"

 

 

0
Yavor
Telerik team
answered on 22 Jan 2010, 01:47 PM
Hello CH,

As a quick follow up on the post which I made previously.
I further tracked the issue, and, depending on the number of records displayed, a similar issue to the one which you described is shown. This behavior is caused by a limitation in the rendering mechanism of the grid, introduced to workaround a bug in IE. One custom solution, which can be used to eliminate this behavior is shown in this forum thread:

http://www.telerik.com/community/forums/aspnet-ajax/grid/popup-form-template-is-not-appear-after-grouping.aspx

I hope this information helps.

Sincerely yours,
Yavor
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
Thomas
Top achievements
Rank 1
answered on 27 Jul 2012, 04:06 PM
I am having the exact problem as documented in this thread.  I downloaded the WebSite1 example and was able to make is fail by adding the setting the property GroupsDefaultExpanded="False" in the MasterTableView.

I then modified the property on my form and still the edit form would not open.  I then set the set the property GroupLoadMode="Client" in the MasterTableView and everything works!

I can run like this for the short term but as this form has the potential for displaying a large amount of information this needs to be addressed and sending everything to the client is not the solution.

Thanks

Tom

0
Pavlina
Telerik team
answered on 31 Jul 2012, 09:43 AM
Hi,

As mentioned in the pointed forum thread - Currently using Popup Edit Form when both grouping and scrolling are enabled is not supported in RadGrid due to browser limitation. Please excuse us for the inconvenience caused.

All the best,
Pavlina
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.
0
Ashraf
Top achievements
Rank 2
answered on 23 Aug 2012, 10:26 AM
still not solved i face the same issue please what is other solution 
0
Pavlina
Telerik team
answered on 28 Aug 2012, 09:09 AM
Hi,

I am afraid that this scenario is currently unsupported. Sorry for the inconvenience.

All the best,
Pavlina
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.
0
Frank
Top achievements
Rank 1
answered on 11 Jan 2017, 03:59 PM

4 more years.... bug is still present here (v4.0.30319).

Wonder why telerik SW guys solved an issue with IE by introducing a new bug? What´s that called?  IE driven development?

I am afraid that this scenario is currently unsupported, too. My solution? Get rid of telerik grid!

Tags
Grid
Asked by
Hiram
Top achievements
Rank 1
Answers by
Yavor
Telerik team
CH
Top achievements
Rank 1
Hiram
Top achievements
Rank 1
Thomas
Top achievements
Rank 1
Pavlina
Telerik team
Ashraf
Top achievements
Rank 2
Frank
Top achievements
Rank 1
Share this question
or