PDA

View Full Version : [CLOSED] Make GridPanel ReadOnly



PriceRightHTML5team
Jul 16, 2013, 11:08 AM
Hi Team,

I have a gridpanel in which i can edit cells for batch save.
But for some scenarios i need to make it not editable.

Can you please tell how do i achieve that i need the code on Ext.Onready function

Thank You

Daniil
Jul 16, 2013, 3:03 PM
Hi @PriceRightHTML5team,

I can suggest the following solution.

1. Set up:

<ext:CellEditing runat="server">
<Listeners>
<BeforeEdit Handler="return !e.grid.lockEditing;" />
</Listeners>
</ext:CellEditing>

2. Lock this way:

App.GridPanel1.lockEditing = true;

3. Unlock this way:

App.GridPanel1.lockEditing = false;

PriceRightHTML5team
Jul 17, 2013, 4:23 AM
Hi @PriceRightHTML5team,

I can suggest the following solution.

1. Set up:

<ext:CellEditing runat="server">
<Listeners>
<BeforeEdit Handler="return !e.grid.lockEditing;" />
</Listeners>
</ext:CellEditing>

2. Lock this way:

App.GridPanel1.lockEditing = true;

3. Unlock this way:

App.GridPanel1.lockEditing = false;

Thanks Daniil that worked