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
210
Hiding row in client side Header style lost
posted

In webdatagrid 12.1, When hiding a row in client side,  gird header and footer have lost style and header text in chrome. can any one assist on the problem.

this is the code I have used to hide row in client side

activeRow._element.cells[1].style.display ="none";

activeRow._element.cells[1].style.visibility ="hidden";

Parents
  • 20255
    Offline posted

    Hello,

     Thank you for using our forum!

     About your issue, can I suggest you to use .get_element() instead of _element. This is because _element and all properties that starts with underscore (_) are private, they are not developed to be used by the end user, only by the developers, and they can be changed "behind the scene" without end user to notice.

     My suggestion is to use get_element() to get the row and add a css class to that element which in our case will be tr.

     Code snipped:

    <style>
            .hide
            {
                display:none;
                 visibility:hidden;
            }
     </style>

    <script type="text/javascript">
            $(function () {
                $("#actionBtn").on("click", function() {
                    $(ig_controls.WebDataGrid1.get_rows().get_row(0).get_element()).toggleClass("hide");
                    $(this).val() == "Hide" ? $(this).val("Show") : $(this).val("Hide");
                })
            });
     </script>

     I have create you a sample that is showing how to hide rows with jQuery. If my suggestions do not help you to resolve the issue, make changes to the sample in order to reproduce it, and send it back to me to review it. 

     If you have any further questions do not hesitate to contact me

    HideRow.zip
Reply Children
No Data