PDA

View Full Version : How to disable grid row.



princeamar
27 Sep 2016, 1:59 AM
Hii,

I have grid like is

55207

I want is that whenever I Click on any checkcloumn - "Checked" then the rest of two grid column get Disable and all the data of these two rows get clear. and when user uncheck checkbox the user get edit the other two rows.

I should i do for this.

Thanks,
Amar

Gary Schlosberg
27 Sep 2016, 1:11 PM
You'll probably want to listen for the checkchange (http://docs.sencha.com/extjs/4.2.5/#!/api/Ext.grid.column.Check-event-checkchange) event and use the setDisabled() (http://docs.sencha.com/extjs/4.2.5/#!/api/Ext.grid.column.Check-method-setDisabled) method to change the other columns.

princeamar
28 Sep 2016, 2:17 AM
Hii, Gary thanks for your reply,

But my actual requirement is -
1- When I check checkcolumn of Row -2 Then Row -1 and Row-3 Should be disable (User can't edit grid cell in my grid i am using edit plugin) and data should be clear of these 2 rows.

Note - Except Checked Checkcolumn grid row all the row should be disable (Non-Editable) with clear value.

Thanks,
Amar

Gary Schlosberg
28 Sep 2016, 1:53 PM
Apologies for misreading your question. There's no built-in way to disable grid rows, and you'd like to keep the check column enabled, so you'll need to create this functionality yourself. Perhaps you could listen for the beforecheckchange event on the check column and utilize a custom renderer to alter the appearance.