Converting a sharepoint list item value to a decimal and assigning it to a radrating value using telerik. The radrating value is a decimal and when converting the list item the error occurs.
RadRating1.Value = Convert.ToDecimal(oList["Average Rating"]);
I've also tried (decimal) but that gives another error message. Any ideas as to why it wont accept the statement?
oList population:
void loadSuggestions()
{
SPList olstSuggestions = oWeb.Lists["Suggestions"];
SPQuery qSuggestions = new SPQuery();
qSuggestions.RowLimit.Equals(10);
qSuggestions.Query = string.Format(@"
<Where>
<Eq>
<FieldRef Name='Archived' />
<Value Type='Choice'>No</Value>
</Eq>
</Where>");
SPListItemCollection oSuggestionCollection = olstSuggestions.GetItems(qSuggestions);
int count = 1;
foreach (SPListItem oList in oSuggestionCollection)
{<above statement>...}
}