paul.truman-sunmed.co
-
9/21/2012 9:30:35 AM
Document Tpye Custom Filter
Hi, I've been trying to adapt the 'custom filter' code on your site to work with a custom document type I have created. Instead of it filtering by Department (as it does in your example), I would like to populate the dropdown menu with a field (EventCode) from my custom document type table (custom.course). Does anyone know how I need to change the code below in order to do this? I've spent days trying different things and have gotten no-where :o(
private void InitializeDepartments() { // Get all product departments DataSet departments = DepartmentInfoProvider.GetDepartments("", "DepartmentDisplayName", 0, "DepartmentID, DepartmentDisplayName");
// Check if there are any product departments if (!DataHelper.DataSourceIsEmpty(departments)) { // Bind deparments to the drop-down list this.drpDepartment.DataSource = departments; this.drpDepartment.DataTextField = "DepartmentDisplayName"; this.drpDepartment.DataValueField = "DepartmentID";
this.drpDepartment.DataBind();
// Add default '(all)' value this.drpDepartment.Items.Insert(0, new ListItem("(all)", "##ALL##")); } }
|