var rows = page.GetPropertyValue<GridRowCollection>(questionField);
var questions=new List<GoldenQuestion>();
foreach (var row in rows)
{
var question = new GoldenQuestion
{
ControlType = row.GetCell("controlType").GetPropertyValue<string>(),
Question = row.GetCell("question").GetPropertyValue<string>(),
Answers = row.GetCell("answers").GetPropertyValue<string>().Replace(Environment.NewLine, string.Empty).Replace("\n","").Split('|').ToList() //use the trim to get rid of \r\n
};
questions.Add(question);
}
return questions;
Datatype grid and Ipublisehed content
Guys,
What is the best way of working with retrieving data from datatype grid property and Ipublished content, I have so far:
Where page is IPublishedContent or is there a propertyvalue convertor?
Regards
Ismail
So in answer to my own question
Regards
Ismail
Is there a using directive or reference for GridRowCollection? I can't get this to work.
Thanks
is working on a reply...