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

[Solved] Add New, Edit and Delete : hide with javascript?

2 Answers 81 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.
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Louis asked on 19 Jan 2012, 09:26 PM
Hello,

If this possible, who I can hide/display Add New, Edit and Delete button with javascript (I use Razor)?  I wish to display or not those buttons in a child grid  when user select a row in a master.

Thank you and congradulation for your wonderful tools!!!


2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 20 Jan 2012, 09:50 AM
Hello louis,

You may hide the appropriate buttons by  using detail grid's DataBound event. For example:

function dataBound() {
    if (something()) {
     $(this).find(".t-grid-edit,.t-grid-delete,.t-grid-add").hide();
    }
}


Regards,
Rosen
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
Louis
Top achievements
Rank 1
Iron
Iron
Iron
answered on 21 Jan 2012, 03:31 AM
It's working!!! THANK YOU A LOT ROSEN.
Tags
Grid
Asked by
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Rosen
Telerik team
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or