Irwsoft Web Control

DropDownTable
Brief Information
DescriptionA selection control for relation tables from one to many.
The child table consume the master table using its primary key.
FeaturesBind one or more properties for Foreign key (multi-columns) in child table with one or more columns.
DropDownTable control
DropDownTable control


The IWC ASP.net DropDownTable control is input control for relation tables from one to many. Which generally the child table consumes the master table using its primary key.

All IWC input control designed using MVVM pattern which mean you can have a data-model class representing a domain/table, but ofcourse you can still using classic CRUD programming without any data-model. You can use simple C# class, Irwsoft Data Framework, Entity Framework, Linq to Sql or other .NET ORM. Then set its data-source and some properties to bind.

Example : Input EmployeeID data of DivisionEmployee table from Person table with DropDownTable


C# code for Person table

// 1) Sample code for DivisionEmployee table
public class DivisionEmployee
{
     // 2) The columns of DivisionEmployee table.
     public int DivisionID { get; set;}
     public int EmployeeID { get; set;}  // 2) Input EmployeeID property of DivisionEmployee.
}

// 3) Sample code for Division table
public class DivisionEmployee
{
     public int ID { get; set;}
     public string Name { get; set;}
}

// 4) Sample code for Person table
public class Person
{
     public int ID { get; set;}
     public string FirstName { get; set;}
     public string LastName { get; set;}
     public GenderType Gender { get; set;}
     public DateTime DateOfBirth { get; set;}
     public int Age { get; set;}
     public string Address { get; set;}
     public string City { get; set;}
     public string Country { get; set;}
     public string IdentityCardNo { get; set;}
     public string BioData { get; set;}
     public string PictureUrl { get; set;}
}


ASPX code for DropDownTable

// 1) Defines the DropDownTable control
<irw:DropDownTable ID="DDT1" runat="server" SkinStyle="SimpleGrey"
     DataSourceID="ODS1" DataFormat="{0}) {1} {2}" Width="300">
     <DataPropertyNames>  // 2) Defines a propertyto bind inside DataPropertyNames tag
          <irw:DataPropertyName Name="EmployeeID" DataType="Integer" />
     </DataPropertyNames>
     <Header>  // 3) Defines the columns of Person table
          <irw:DropDownTableColumn Name="ID" DataType="Integer" Key="true" />
          <irw:DropDownTableColumn Name="FirstName" />
          <irw:DropDownTableColumn Name="LastName" />
     </Header>
</irw:DropDownTable>


Related Topics :


Irwsoft Data Ultimate Edition 4.0 supports data-schema extension (entity framework, linq to sql, simple class, and etc).