开发者

How can i display item on itemList of devexpress LookupEdit

Hai all, Am using DevExpress LookupEdit in C#.NET project,also set both Display Member and Value member property of LookupEdit and items are not dispaying on LookupEdit list page ,but i can select items. After selecting one item the selected item dispayed on LookupEdit text. Please help

lkpReference.Properties.DataSource = _lab.selectLabReference() ;
lkpReference.Properties.DisplayMember = "refernce_name";
开发者_JS百科lkpReference.Properties.ValueMember = "lab_ref_id";
lkpReference.Properties.BestFitMode = BestFitMode.BestFit;
lkpReference.Properties.SearchMode = SearchMode.AutoComplete;

LookUpColumnInfoCollection collns = lkpReference.Properties.Columns;

collns.Add(new LookUpColumnInfo("Lab Reference", 0));
lkpReference.Properties.AutoSearchColumnIndex = 1;


lkpReference.Properties.DataSource = _lab.selectLabReference() ;
lkpReference.Properties.DisplayMember = "refernce_name";
lkpReference.Properties.ValueMember = "lab_ref_id";
lkpReference.Properties.BestFitMode = BestFitMode.BestFit;
lkpReference.Properties.SearchMode = SearchMode.AutoComplete;

// the constructor you are using accepts 2 parameters: FieldName (which is the name
// of the field from the DataTable) and Width (which is the width of the column
// displayed in the dropdown). You have set both parameters wrong.

//LookUpColumnInfoCollection collns = lkpReference.Properties.Columns;
//collns.Add(new LookUpColumnInfo("Lab Reference", 0));

// what you intended to do is this
lkpReference.Properties.Columns.Add(new LookUpColumnInfo("refernce_name", 100, "Lab Reference"));

lkpReference.Properties.AutoSearchColumnIndex = 1;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜