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

[Solved] Hide Grid Row

3 Answers 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Biju
Top achievements
Rank 1
Biju asked on 28 Dec 2011, 10:39 PM
How can i hide all the grid row except which i selected.

Html.Telerik().Grid(Model)
            .Name("grdRecipients")
            .HtmlAttributes(new { style = "" })
           .Columns(columns =>
            {
                columns.Bound(o => o.RecipientID).Title(Resources.Recipients.FieldLabel_RecipientId);
                columns.Bound(o => o.FirstName).Title(Resources.Recipients.FieldLabel_FirstName);
                columns.Bound(o => o.DateofBirth).Format("{0:MM/dd/yyyy}").Title(Resources.Recipients.FieldLabel_DOB);
            })
            .ClientEvents(events => events.OnDetailViewExpand(() =>
           {
                %>
                function(e) {
                    //edit handling code
                    ///   ?????
                }
                <%
           }))

I would like to have client side script to hide the row.

3 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 29 Dec 2011, 12:30 PM
Hello Biju,

To hide all the other rows except the one which detail view is expanded you can use the following JavaScript in your OnDetailViewExpand handler function:
$(e.masterRow).siblings().hide();


All the best,
Petur Subev
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Biju
Top achievements
Rank 1
answered on 29 Dec 2011, 07:53 PM
Thanks it works.  Do you have any document?
0
Petur Subev
Telerik team
answered on 30 Dec 2011, 09:50 AM
Hello Biju,


The Client API and events documentation for the Grid can be found here.


Kind regards,
Petur Subev
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Biju
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Biju
Top achievements
Rank 1
Share this question
or