public void ViewDidLoad() { //create the data table object and set a name var aDataSource = new DSDataTable("ADT"); //add a column var dc1 = new DSDataColumn("Title"); dc1.Caption = "Title"; dc1.ReadOnly = true; dc1.DataType = typeof(String); dc1.AllowSort = true; //dc1.Width = ColumnsDefs[aKey]; aDataSource.Columns.Add(dc1); //add a row to the data table var dr = new DSDataRow(); //dr["ID"] = loop; dr["Title"] = @"Test"; dr["Description"] = @"Some description would go here"; dr["Date"] = DateTime.Now.ToShortDateString(); dr["Value"] = "10000.00"; //set the value as an image //dr["Image"] = UIImage.FromFile("first.png") aDataSource.Rows.Add(dr); }
public override global::System.Data.DataTable Clone() { DSDataTable cln = ((DSDataTable)(base.Clone())); cln.InitVars(); return(cln); }
private void InitClass() { this.DataSetName = "DSBuyerReportDetail"; this.Prefix = ""; this.Namespace = "http://tempuri.org/DSBuyerReportDetail.xsd"; this.EnforceConstraints = true; this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tableDS = new DSDataTable(); base.Tables.Add(this.tableDS); }
internal void InitVars(bool initTable) { this.tableDS = ((DSDataTable)(base.Tables["DS"])); if ((initTable == true)) { if ((this.tableDS != null)) { this.tableDS.InitVars(); } } }
/// <summary> /// Convert a .Net DataTable object to a DSDataTable object /// </summary> /// <returns>The DS data set.</returns> /// <param name="Data">Data.</param> public static DSDataTable ToDSDataTable(this DataTable Data) { var newDT = new DSDataTable(Data.TableName); //add columns foreach (DataColumn column in Data.Columns) { newDT.Columns.Add(column.ToDSDataColumn()); } foreach (DataRow row in Data.Rows) { newDT.Rows.Add(row.ToDSDataRow()); } return(newDT); }
internal DSRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableDS = ((DSDataTable)(this.Table)); }