Ok, I figured something out that seems to work:
In Admin/Orders/Edit/FindProduct.ascx, add an onrowdatabound attribute:
Code: Select all
<asp:GridView ID="FindProductSearchResults" runat="server" AutoGenerateColumns="false" DataSourceID="AddProductDs" AllowPaging="true" PageSize="20" AllowSorting="true" Visible="false" SkinID="PagedList" Width="460px" onrowdatabound="FindProductSearchResults_RowDataBound">
In Admin/Orders/Edit/FindProduct.ascx.cs, add a method to handle onrowdatabound:
Code: Select all
protected void FindProductSearchResults_RowDataBound(object sender, GridViewRowEventArgs e)
{
Product p = e.Row.DataItem as Product;
if (p != null && (p.DisablePurchase || p.Visibility == CommerceBuilder.Catalog.CatalogVisibility.Private))
{
e.Row.Visible = false;
}
}