views:

68

answers:

2

Hi all

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

Best Regards,

A: 

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;
Johan Leino
+1  A: 

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

Yongwei Xing