user1682877
user1682877

Reputation: 33

ext js 4.1 :how to make only one column editable at a time

I have a grid with the following 3 columns.enter image description here

I want to make the Spend & discount fields editable.But one should be editable at a time.If am editing discount column then spend field should not be editable and the value of spend field should changed to the following based on the value in discount

Spend= Spend before Discount +(Spend before Discount*Discount/100);

vice versa for editing Spend field

How can i do this?I request for a complete example.Some one please help me

Thanks in advance

Upvotes: 0

Views: 420

Answers (1)

Evan Trimboli
Evan Trimboli

Reputation: 30092

Listen to the beforeedit event that gets fired. IF you return false editing will be cancelled, so you can do your check in there.

Upvotes: 1

Related Questions