Remove an empty item from the list.

The ListBox / Dropdown list uses an external data source (common name list) as a data source to populate items. But there is one problem, the first element is an empty element, can we remove it?

Regards,

+3
source share
2 answers

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

+1
source

If you are using .net 3.5, you can use some LINQ to filter empty ones:

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

Source: https://habr.com/ru/post/1743301/


All Articles