Bug Report T441573
Visible to All Users

RepositoryItemRatingControl - There is no way to set a custom rating range

created 8 years ago

I need to be able to scale a value that represents a rating before the RepositoryItemRatingControl shows it. For obscure reasons we're storing our ratings as an integer ranging from 0 to 50. I need to scale the rating down by a factor of 10, so that it matches 0 to 5 stars.

I have attached an example of how I thought it should work, but I can't get it to work. The Format EditValue is never called.

How can I scale the values before displaying them?

Thanks.

Comments (1)
DevExpress Support Team 8 years ago

    Hi,

    I see that currently, there is no way to determine the minimum and maximum values. I will pass this behavior to our R&D team for investigation. We will update this thread once we have results.

    In the meantime, you can accomplish your task by creating an unbound Integer column and populating it with the necessary values manually in the GridView.CustomUnboundColumnData event. Then, assign RepositoryItemRatingControl to this column and hide the original one.

    Answers approved by DevExpress Support

    created 8 years ago (modified 8 years ago)

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    Additional information:

    We have added new RepositoryItemRatingControl.FirstItemValue and RepositoryItemRatingControl.ValueInterval properties. Set the first property to determine the first possible rating value. The second property is necessary to specify a rating value interval.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.