/// <summary> /// Binds the grid for type attributes. /// </summary> /// <param name="typeId">The type id.</param> protected void rGridAttribute_Bind( string typeId ) { var queryable = new AttributeService().Queryable(). Where( a => a.EntityTypeId == _entityTypeId && ( a.EntityTypeQualifierColumn ?? string.Empty ) == _entityQualifier && ( a.EntityTypeQualifierValue ?? string.Empty ) == typeId ); SortProperty sortProperty = rGridAttribute.SortProperty; if ( sortProperty != null ) queryable = queryable. Sort( sortProperty ); else queryable = queryable. OrderBy( a => a.Category ). ThenBy( a => a.Key ); rGridAttribute.DataSource = queryable.ToList(); rGridAttribute.DataBind(); }