We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to hide a row in the grid, client side.

Hi,
I have a requirement to hide selected rows of the grid (not delete). Is there a way to do it?
Thank you
Kalum

1 Reply

VN Vignesh Natarajan Syncfusion Team November 7, 2018 05:33 AM UTC

Hi Kalum, 

Thanks for contacting Syncfusion support. 

Query : I have a requirement to hide selected rows of the grid (not delete). Is there a way to do it?  
 
From your query we understand that you need to hide the selectedRows in ejGrid. We have achieved your requirement using the getSelectedRows() method of ejGrid and hide the selected rows in an external button click. 

Refer the below code example. 


@Html.EJ().Button("button").Text("Hide Row").Size(ButtonSize.Normal).ShowRoundedCorner(true).ClientSideEvents(eve => eve.Click("hiderow")) 
 
 
 
@(Html.EJ().Grid<object>("Editing") 
            .Datasource((IEnumerable<object>)ViewBag.datasource) 
 
                             ---------             
 
           .AllowPaging() 
            .Columns(col => 
            { 
 
                            -------- 
 
            })) 
 
 
<script type="text/javascript"> 
 
    function hiderow(args) { 
 
        var obj = $(".e-grid").ejGrid("instance"); 
        var row = obj.getSelectedRows(); 
        row.hide(); 
    } 
</script> 


Refer our API documentation for your reference 


If you need any further assistance, please get back to us. 

Regards, 
Vignesh Natarajan 
 


Loader.
Live Chat Icon For mobile
Up arrow icon