开发者

How to populate Listbox datavaluefield with multiple fields

--VB.NET----

Kindly help me this

I need to populate listbox datavaluefield with multiple field. The value will be coming to datatable - (dataset). I can't change the sql statement because it is under stored proc that uses globally

lstSearchResult.DataSource = dt
lstSearchResult.DataValueField = "EMP_ID" & "LNAME" &"ADD" ->> could it be possible
lstSearchResult.DataTextField = "LNAME"
lstSearchR开发者_开发问答esult.DataBind()

thanks...


Spin through the DataTable and add a new ListItem for each DataRow, concatenating the different fields when making the ListItems. You can't bind two fields as the DataValueField.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜