Hide a datagrid when no results are found
Posted on 2004-11-09
I have two datagrids one on top of the other, and when you enable and disable and item it displays either on top as active or on the bottom as disabled, i want the disabled datagrid not to show up, right now it shows the header, but i want it removed completly. How would i disable the bottom datagrid when nothing is disabled? See code for more info.
private void BindGrids()
grdActivePages.DataSource = Section.GetPagesBySectionID(sectionID,1);
grdActivePages.DataMember = "ID";
grdDisabledPages.DataSource = Section.GetPagesBySectionID(sectionID,0);
grdDisabledPages.DataMember = "ID";