Features

DbNetCombo is a web-based, database driven combo control that makes it easy to create selectable lists of items from the database. Instances of DbNetCombo can be easliy linked together to create dependent lists that can quickly drill-down into data.

Ease of use

DbNetCombo can be added to any web page (including classic ASP and HTML pages) with just a few lines of code. It is compatible with both Web Forms and MVC and can be implemented as a JavaScript object or an ASP.NET server-control.

jQuery(document).ready( init )

function init()
{
		var dbnetcombo1 = new DbNetCombo("dbnetcombo1");

		with (dbnetcombo1)
		{
			connectionString = "SamplesDatabase"
			sql = "select customerid, companyname from customers order by companyname"
			initialize()
		}
}
DbNetCombo implemented as a JavaScript object
 
			<DNL:DbNetCombo 
				id="DbNetCombo1" 
				runat="server" 
				ConnectionString = "SamplesDatabase"
				Sql = "select customerid, companyname from customers order by companyname"
				>
			</DNL:DbNetCombo>
DbNetCombo implemented as an ASP.NET server-control

DbNetCombo can assign additional information as attributes for each item the list. This information is then readily available in your application.

Click to open
Integration

In addition to running stand-alone DbNetCombo can be integrated with DbNetGrid and DbNetEdit to provide a filtering mechanism.

Click to open
	jQuery(document).ready( init )

	function init()
	{
		var countries = new DbNetCombo("countries");
		var cities = new DbNetCombo("cities");
		var customers = new DbNetCombo("customers");
		var orders = new DbNetGrid("orders");
		var orderDetails = new DbNetGrid("orderDetails");

		with (orderDetails)
		{
			connectionString = "SamplesDatabase"
			fromPart = "[order details]"
			setColumnExpressions("OrderID", "ProductID", "Quantity", "UnitPrice");
			navigation = false

			setColumnProperty("OrderID", "foreignKey", true);
			setColumnProperty("OrderID", "display", false);
			setColumnProperty("ProductID", "lookup", "select productid, productname from products");
		}

		with (orders)
		{
			connectionString = "SamplesDatabase"
			fromPart = "orders"
			navigation = false
			setColumnExpressions("OrderID", "OrderDate", "RequiredDate", "ShippedDate", "CustomerID");
			setColumnProperty("CustomerID", "foreignKey", true);
			setColumnProperty("CustomerID", "display", false);
			addLinkedControl( orderDetails )
		}


		with (customers)
		{
			sql = "select customerid, companyname from customers where city = ? order by 1";
			parameters = {country : ""}
			addLinkedControl(orders)
		}

		with (cities)
		{
			sql = "select distinct city from customers where country = ? order by 1";
			parameters = {country : ""}
			addLinkedControl(customers)
		}

		with (countries)
		{
			connectionString = "SamplesDatabase"
			sql = "select distinct country from customers where country is not null order by 1"
			addLinkedControl(cities)
			initialize()
		}
	}