Ajax Control Toolkit Rating Control- Override Ratingbehavior.js
Rating control in Ajax control toolkit will not raise the event if a user clicks on current rating star because in behaviour js it has checked if (this._ratingValue != this._curren
Solution 1:
I have solved it by putting the code just above
function AddNewRatingHandler() {
AjaxControlToolkit.RatingBehavior.prototype._onStarClick =
function(e) {
if (this._readOnly) {
return;
}
// if (this._ratingValue != this._currentRating) { this.set_Rating(this._currentRating);
// }
};
AjaxControlToolkit.RatingBehavior.prototype.set_Rating = function(value) {
// if (this._ratingValue != value) {this._ratingValue = value;
this._currentRating = value;
if (this.get_isInitialized()) {
if ((value < 0) || (value > this._maxRatingValue)) {
return;
}
this._update();
AjaxControlToolkit.RatingBehavior.callBaseMethod(this, 'set_ClientState', [this._ratingValue]);
this.raisePropertyChanged('Rating');
this.raiseRated(this._currentRating);
this._waitingMode(true);
var args = this._currentRating + ";" + this._tag;
var id = this._callbackID;
if (this._autoPostBack) {
__doPostBack(id, args);
}
else {
WebForm_DoCallback(id, args, this._receiveServerData, this, this._onError, true)
}
}
// }
};
}
AddNewRatingHandler();
</script>
</div>
</form>
Post a Comment for "Ajax Control Toolkit Rating Control- Override Ratingbehavior.js"