开发者

Remove the blank item from ListBox

The ListBox/Dropdown list use a external datasource(sharepoint list) as a datasource to popula开发者_StackOverflowte the items. But there is one problem, the first item is a blank item, can we remove it?

Best Regards,


I have solved this problem. http://www.jdxyw.com/?p=590


If you are using .net 3.5 you could use some LINQ to filter out the empty ones:

var ds = from SPListItem item in GetListItemsCode()
         where item.Title != string.Empty
         select item;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜