2016년 12월 10일 토요일

suggestion on splitting lists


hi, i have a simple list made by two elements called TAG NAME and TAG VALUE, that i insert in two different textbox

I join the two values with a §, then i can see it in a listpicker

now, the problem is that sometimes, i need only TAG NAME (maybe i don't need a value but only a name)
when i set the list picker, since i want to see well separated the two elements TAG NAME and TAG VALUE, I split the item list formed by  TAG NAME§TAG VALUE, and i add (as you can see it below) a "\n" and "--------------" to see in a good way
the problem is that if there is only a TAG NAME without a TAG VALUE, the listpicker give error, since there is not the 2nd element of the list, so i used a if to see if in the element there is a §

you have a better way? 

 Cattura.png
 Catura2.png

-- 
After the split, test if the split result list has list length > 1, otherwise ignore the 2nd list item.

-- 
i made it, but your way is far better. as usual

-- 


댓글 없음:

댓글 쓰기