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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

140765 Nov 6,2018 09:28 AM UTC Nov 7,2018 05:33 AM UTC ASP.NET MVC 1
loading
Tags: Grid
kalum
Asked On November 6, 2018 09:28 AM UTC

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

Vignesh Natarajan [Syncfusion]
Replied On 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 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;