Skip to content

Instantly share code, notes, and snippets.

@naepalm
Last active July 20, 2018 15:06
Embed
What would you like to do?
Checks to see if a grid has a specific row.
public static bool HasGridRow(this GridDataModel model, string rowName)
{
if (model.Sections.Any())
{
foreach (var section in model.Sections)
{
if (section.HasRows)
{
foreach (var row in section.Rows)
{
if (row.Name.ToLower() == rowName.ToLower())
{
return true;
}
}
}
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment