Irwsoft Web Control

DataView
Brief Information
DescriptionRead only control to display the items from data source in a table.
Features
  • Filter/search,
  • Freeze columns,
  • Sort,
  • Paging, and
  • Summary to calculate sum, max, min and average of specific column.
  • Supports image preview and/or file downloading for Image/File data-type.
DataView
DataView control with all features on


The DataView control is read only control that displays the items from data source in a table. This control allows you to filer/search, freeze columns, and sort these items. The summary feature allows to calculate sum, max, min and avarege of values(rows) of spcefic column. The last is paging that allows you to view data in specific size. All these features are available and just need to set on.


DataView Freeze

DataView freezing


DataView Async

DataView async loading


Example : Display Person table with DataView


C# code for Person table

// 1) Sample code for Person table
public class Person
{
     // 2) The columns of Person table.
     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 DataView

// 1) Defines the DataView control
<irw:DataView ID="DV1" runat="server" SkinStyle="SimpleGrey" Height="150" AllowFreezing="true"
     AllowSorting="true" AllowFiltering="true" AllowPaging="true" PageSize="10" OnDataLoad="DV1_DataLoad"
     OnFiltering="DV1_Filtering" OnSorting="DV1_Sorting">
     <Title>
          <div>Emplyee of The ABC corp.</div>
     </Title>
     <Header>  // 2) Defines the properties need to display inside Header tag
          <irw:DataViewColumn Name="ID" DataType="Integer" Key="true" Width="30" />
          <irw:DataViewColumn Name="FirstName" Width="150" Freeze="true" />
          <irw:DataViewColumn Name="LastName" Width="150" Freeze="true" />
          <irw:DataViewColumn Name="Gender" Width="70" DataType="List" Type="SamplesNET2.Data.GenderType" />
          <irw:DataViewColumn Name="DateOfBirth" DataType="DateTime" Format="d" Width="100" />
          <irw:DataViewColumn Name="Age" Width="50" DataType="Integer" />
          <irw:DataViewColumn Name="Address" Width="200" />
          <irw:DataViewColumn Name="City" Width="100" />
          <irw:DataViewColumn Name="Country" Width="100" />
     </Header>
     <Footer>
          <div style="text-align: right;">1st Januray 2016</div>
     </Footer>
</irw:DataView>


Related Topics :


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