using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
using System.IO;
 
namespace WindowsFormsApplication12
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.Bind();
}
 
private void Bind()
{
DataGridView dataGridView1 = new DataGridView();
dataGridView1.Dock = DockStyle.Fill;
this.Controls.Add(dataGridView1);
List<XList> fXList = new List<XList>();
 
fXList.Add(new XList(1, "Rol", true));
fXList.Add(new XList(2, "Chole", false));
fXList.Add(new XList(3, "John", true));
fXList.Add(new XList(4, "X.X.Y", false));
 
dataGridView1.DataSource = fXList;
}
}
 
public class XList
{
private int fId;
private string fName;
private bool fIsDeleted;
 
public int Id
{
get { return fId; }
set { fId = value; }
}
 
public string Name
{
get { return fName; }
set { fName = value; }
}
 
public bool IsDeleted
{
get { return fIsDeleted; }
set { fIsDeleted = value; }
}
 
public XList(int fId, string fName, bool fIsDeleted)
{
this.fId = fId;
this.fName = fName;
this.fIsDeleted = fIsDeleted;
}
}
}