Last active
July 20, 2018 15:06
-
-
Save naepalm/bea3e418a58e93eb570f6b10b8316c64 to your computer and use it in GitHub Desktop.
Checks to see if a grid has a specific row.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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