ComponentOne FlexGrid for WinForms
UnboundValueEventArgs Class
Members  Example 

C1.Win.C1FlexGrid Namespace : UnboundValueEventArgs Class
Provides data for the C1FlexGridBase.GetUnboundValue and C1FlexGridBase.SetUnboundValue events.
Syntax
'Declaration
 
Public Class UnboundValueEventArgs 
   Inherits System.EventArgs
public class UnboundValueEventArgs : System.EventArgs 
Remarks
Example
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;
}
Inheritance Hierarchy

System.Object
   System.EventArgs
      C1.Win.C1FlexGrid.UnboundValueEventArgs

See Also

Reference

UnboundValueEventArgs Members
C1.Win.C1FlexGrid Namespace