'Declaration
Public Class UnboundValueEventArgs Inherits System.EventArgs
public class UnboundValueEventArgs : System.EventArgs
'Declaration
Public Class UnboundValueEventArgs Inherits System.EventArgs
public class UnboundValueEventArgs : System.EventArgs
private void Form1_Load(object sender, EventArgs e) { _flex = new C1FlexGrid(); _flex.Dock = DockStyle.Fill; this.Controls.Add(_flex); OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\ComponentOne Samples\\Common\\C1NWind.mdb"); DataTable productsTable = new DataTable(); new OleDbDataAdapter("Select * from Products", con).Fill(productsTable); _flex.DataSource = productsTable; // add unbound column Column col = _flex.Cols.Add(); col.Name = col.Caption = "Unbound"; _flex.GetUnboundValue += _flex_GetUnboundValue; _flex.SetUnboundValue += _flex_SetUnboundValue; } Hashtable _hash = new Hashtable(); // get value from hashtable using ProductID as key void _flex_GetUnboundValue(object sender, C1.Win.C1FlexGrid.UnboundValueEventArgs e) { DataRowView drv = (DataRowView)_flex.Rows[e.Row].DataSource; e.Value = _hash[drv["ProductID"]]; } // store value in hashtable using ProductID as key void _flex_SetUnboundValue(object sender, C1.Win.C1FlexGrid.UnboundValueEventArgs e) { DataRowView drv = (DataRowView)_flex.Rows[e.Row].DataSource; _hash[drv["ProductID"]] = e.Value; }
System.Object
System.EventArgs
C1.Win.C1FlexGrid.UnboundValueEventArgs