PDA

View Full Version : [CLOSED] Problem with BeforeSelect on the Grid



Peter.Treier
Nov 26, 2014, 12:53 PM
Hi all

I need to check the State of some data in a Master/Detail View.
The Master View Element is a GridPanel, the Detail a FormPanel. I to the check on the Grid's BeforeSelect Listener. In case of Invalid Data the Method returns false...


<Listeners>
<BeforeSelect Handler="CheckPositionValidity(item,record,index);" />
<SelectionChange Handler="loadItemDetail(item, selected); " />
</Listeners>

It doesn't matter if the BeforeSelect returns true or false, the Selection Change is triggered. I also tried to use the Select Event - same problem.

Any Idea on how I can prevent the Selection Change in case of non valid Detail Data ?

Peter

Peter.Treier
Nov 27, 2014, 10:53 AM
Any Ideas ?

Daniil
Nov 27, 2014, 2:03 PM
Hi Peter,

The BeforeSelect handler doesn't return anything.

Please use:

<BeforeSelect Handler="return CheckPositionValidity(item,record,index);" />

Peter.Treier
Nov 28, 2014, 7:55 AM
Well, yes :-/

It seems to work now !

Thanks
Daniil - have a nice weekend