DevExpress GridControl LookUpEdit

Posted by vinaykannegundla-20815 under Windows Forms on 11/16/2013 | Points: 10 | Views : 4813 | Status : [Member] | Replies : 0
In WindowsForm add the GridControl,
In this Grid I add two Columns "sCode","sName"
and one column adding RepositoryItemLookUpEdit
Then Form1.cs

private void frmCodes_Load(object sender, EventArgs e)
{
DataTable dtItems = new DataTable();
dtItems.Columns.Add("sItemCode");
dtItems.Columns.Add("sItemName");
DataRow dr = dtItems.NewRow();
dr[0] = "";
dr[1] = "";
dtItems.Rows.Add(dr);
gridControl1.DataSource = dtItems;

conn.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from item_details", conn);
DataSet ds = new DataSet();
BindingSource bs = new BindingSource();
SqlCommandBuilder scb = new SqlCommandBuilder(da);
da.Fill(ds);
bs.DataSource = ds.Tables[0];
RepositoryItemLookUpEdit1.DataSource = bs;
RepositoryItemLookUpEdit1.DisplayMember = "sCode";
conn.Close();

Then,I want Selects the lookUpEdit Values it shows the Message selected value
}




Responses

(No response found.)

Login to post response