开发者

How to populate Listbox datavaluefield with multiple fields

开发者 https://www.devze.com 2023-03-20 11:34 出处:网络
--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 und

--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

精彩评论

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

关注公众号