/// <inheritdoc/> public FormGridControlObject SelectPerTitle(ControlSelectionContext context, string title) { ArgumentUtility.CheckNotNull("context", context); ArgumentUtility.CheckNotNull("title", title); // Todo RM-6337: Replace with CSS-based search as soon as FormGridManager is able to render the data-title attribute. // Note: it is not that easy, as we do not know the content of the title row on the server...FormGrid is just a design transformator... //var scope = context.Scope.FindCss (string.Format ("table[{0}='{1}']", DiagnosticMetadataAttributes.FormGridTitle, title)); // Note: this implementation assumes that the title cell has the CSS class formGridTitleCell. var hasClassCheck = XPathUtils.CreateHasClassCheck("formGridTitleCell"); var scope = context.Scope.FindXPath(string.Format(".//table[tbody/tr/td{0}='{1}']", hasClassCheck, title)); // This alterantive implementation assumes that the title cell is the very first row and column. // var scope = context.Scope.FindXPath (string.Format (".//table[tbody/tr[1]/td[1]='{0}']", title)); return(CreateControlObject(context, scope)); }