Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1175
Group By - Add New Row with TABLE elements in a template
posted

In reference too:

http://ko.infragistics.com/community/forums/t/77361.aspx

[BUG]  When using TABLE elements in a template, adding a new row to the grid does not create additional groups.

Parents
No Data
Reply
  • 17590
    Offline posted

    Hello Karthik,

    Thank you for posting in our community.

    I assume that the  issue that you are experiencing is that when you have a grouped columns and add a new it is not going to the respective group. If this is the case what I can suggest is handling rowAdded event of the grid. n this event you could rebind the grid in order to ensure that changes arte accepted by the grid. For example:

     

     $(function () {
       $('#table1').igGrid({
        virtualization: false,
        autoCommit: true,
        autoGenerateColumns: false,
        width: '500px',
        height: '500px',
        columns: [
         { headerText: "Product ID", key: "ProductID", width: "100px", dataType: "number" },
         { headerText: "Units in Stock", key: "UnitsInStock", width: "150px", dataType: "number" },
         { headerText: "Product Description", key: "ProductDescription", width: "150px", dataType: "string" },
         { headerText: "htmlColumn", key: "htmlColumn", width: "100px", dataType: "string", unbound: true, unboundValues: ["<table><tr><td>I WILL FAIL</td></tr></table>", "<table><tr><td>I WILL FAIL</td></tr></table>", /*workaround*/"<DIV><p>I WILL NOT FAIL</p></DIV>"] }
        ],
        dataSource: namedData,
        primaryKey: "ProductID",
                    features: [
                        {
                            name: "GroupBy"
                        },
         {
         name: "Updating",
         rowAdded: function(evt, ui){
         $('#table1').igGrid("dataBind");
         }
         }
                    ]
                });
            });

    I am attaching a small sample illustrating my suggestion for your reference.

    If this is not the behavior that you are experiencing could you please modify my sample and send it back to me. Also, some clarifications are going to be highly appreciated and will help me identify the issue and investigate further.

    I also checked the development issue mentioned in the referenced thread and I can confirm it is resolved in the latest versions of IgniteUI - 14.1, 14.2 and 15.1.

    I hope you find this information helpful.

    Please let me know if you need any further assistance with this matter.

    igGridAddNewRowGrouping.zip
Children