Skip to content

Instantly share code, notes, and snippets.

@naepalm
Last active July 20, 2018 15:06
Show Gist options
  • Save naepalm/bea3e418a58e93eb570f6b10b8316c64 to your computer and use it in GitHub Desktop.
Save naepalm/bea3e418a58e93eb570f6b10b8316c64 to your computer and use it in GitHub Desktop.
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