Here is yet another handy column type coming for RadGrid. The GridRatingColumn will show a RadRating control for every data item in your RadGrid, both in view and edit mode.

RadGrid with Rating column

GridRatingColumn will support 2 modes of interaction. In the standard mode, GridRatingColumn will behave like an ordinary editable column. It will display a read-only RadRating control when the item is in view mode and an editable RadRating control when in edit mode.

Alternatively, the rating column will allow you to change the rating value even in view mode. Thus, when RadGrid posts back, you can get the updated value on the server using one of the 3 methods:

  1. Using GridTableView.ExtractValuesFromItem()
  2. Using GridEditableItem.ExtractValues()
  3. Using the GridEditableItem.EditManager.GetColumnEditor() to get the GridRatingColumnEditor instance associated with the rating column

Some of you may notice that these are exactly the same approaches we use for getting the modified values of items in edit mode (for example when updating). So, with GridRatingColumn it doesn't matter if your items are in edit mode or not. You will always be able get the current rating value in one and the same way.

GridRatingColumn will be bindable to a numeric data field from RadGrid's data source. The column will intelligently try to either convert, or parse the data values to its native decimal data type, so you should have databinding problems only if your data values cannot be represented as numbers at all. You will even be able to bind the column to a boolean field, for a possible rating value of 0 or 1.

Whether you need an easy way to enable rating of multiple items, or you simply want to add some eye candy to your rating reports, GridRatingColumn is just for you. It's coming soon, so stay tuned.

About the Author

Iana Tsolova

is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

Related Posts


Comments are disabled in preview mode.