Petey22uk
Petey22uk

Reputation: 85

SmartGWT - Different behaviour while Editing a ListGrid and EditingNew?

I have a ListGrid that has 4 columns. When I edit the grid (using a DoubleClick event on a record) I'd like the user to only be able to edit one column.

However, I'd like the user to be able to click an 'Add' button, which will call startEditingNew(), where I'd like them to have all columns available for edit.

Can this be done?

Thanks!

Upvotes: 0

Views: 574

Answers (2)

PVR
PVR

Reputation: 2524

I guess both of the requirements can not be applied at the same time but both of them can be implemented in two different grid..

or else you can also try by making all of the columns editable at first and then by by handling DoubleClickHandler you can restrict some columns editing by their column index.But it is totally experiment.

Upvotes: 1

Alain BUFERNE
Alain BUFERNE

Reputation: 2071

I would try to add in the doubleclick handler some code using setCanEdit (false) to the listGridField You don't want to touch. In the button click handler you can set to true for all the fields.

Upvotes: 0

Related Questions