PDA

View Full Version : [CLOSED] event for RatingColumn



CarpFisher
Aug 22, 2012, 5:53 PM
Hi

Is it possible to listen to events for RatingColumn, like clicking on the star?

Chris

Daniil
Aug 22, 2012, 7:08 PM
Hi,

I guess you use this Column with

Editable="true"
option.

If yes, then, probably, you could use the Edit event of GridPanel.

If it's not an option, then I can recommend to override the processEvent function as you need.

Here are the RatingColumn JavaScript sources.

<Ext.NET sources root>\Ext.Net\Build\Ext.Net\ux\ratingcolumn\ratingcolum n.js

CarpFisher
Aug 22, 2012, 7:15 PM
Yes it is editable and I tried to listen the events from the GridPanel, I tried ItemClick and CellClick, however both event won't fire if I clicked on the "star". If I clicked outside of a "star" then the event will fire. Is there other event that may be more suitable?

Daniil
Aug 23, 2012, 5:09 AM
Does the Edit event not suite your needs?

Please clarify the requirement - what do you need to listen RatingColumn clicks for?


Yes it is editable and I tried to listen the events from the GridPanel, I tried ItemClick and CellClick, however both event won't fire if I clicked on the "star". If I clicked outside of a "star" then the event will fire. Is there other event that may be more suitable?

Well, here is the answer.


then I can recommend to override the processEvent function as you need.

Here are the RatingColumn JavaScript sources.

<Ext.NET sources root>\Ext.Net\Build\Ext.Net\ux\ratingcolumn\ratingcolum n.js

CarpFisher
Aug 23, 2012, 8:32 AM
I just need to know when the rating has been modified. Would you please provide an example of how to overide the function in the RatingColumn and linked the event Ext.Net? Thanks

Daniil
Aug 23, 2012, 8:50 AM
Again, did you try the Edit event? It should be fired after any change in RatingColumn.

CarpFisher
Aug 23, 2012, 10:18 AM
The Edit Event did the job perfectly. Thank you very much for your advice :)