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

Disable Grid Update button on Popup Edit

1 Answer 978 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chatra
Top achievements
Rank 1
Chatra asked on 11 Jun 2014, 02:24 AM
hi,


I have Grid who's id is "gWriter"  with popup box edit.

And on Popup Box we have another grid "gAgent" which is also edited in popup mode.

I am trying to enable/disable the update/Save button when Edit model(e.model.new) is "new " of  "gAgent" grid with below statement.

$(".k-edit-form-container .k-state-disabled").addClass("k-grid-update").removeClass("k-state-disabled");

$(".k-edit-form-container .k-grid-update").addClass("k-state-disabled").removeClass("k-grid-update");

But issue is the above statement disable/enabling the buttons on both the grids instead of only "aAgent" Grid.

Thanks,
Chatrapathi Chennam



1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 12 Jun 2014, 02:13 PM
Hi Chatrapathi,

You can use the Grid's edit event to add a class to the popup, so you can distinguish it later. For example: 
edit: function(e){
  e.container.addClass(this.element.attr("id") + "_popup"); //add gWriter_popup or gAgent_popup class to the popup container
},


Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Chatra
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or