Hello,
this method returns error : Ultragrid has no contructor defined .inside else.How to return null row nothing inside else bracket.Thanks
public UltraGridRow CurrentQuestionRowGetter(int questionId,UltraGrid grid) { foreach (UltraGridRow row in grid.Rows) { if (row.Cells["QUESTION_ID"].Value.ToInt() == questionId) { return row; } else { return new UltraGridRow(); } } }
Maybe you could try to use return null; instead of return new UltraGridRow();
public UltraGridRow CurrentQuestionRowGetter(int questionId, UltraGrid grid)
{
foreach (UltraGridRow row in grid.Rows)
if (Convert.ToInt32(row.Cells["QUESTION_ID"].Value) == questionId)
return row;
}
else
return null;
Let me know if you have any questions
Thanks for the feedback. If you have any questions, feel free to write us