How do I sort and add unique array options to a DropDownList using jQuery? -
i have array of objects “allclaimants” has 2 properties (userinfo & userid);
example:
allclaimants[allclaimantscounter].userinfo = "santhalingam sugirtha, 1980-06-05"; allclaimants[allclaimantscounter].userid = "1076073";
my allclaimants[allclaimantscounter].userinfo
information contains 2 things “name + date of birth”.
how can sort (by userinfo - in userinfo want sort name part not date of birth) , add unique values select dropdown (claimantsdropdown) text allclaimants[allclaimantscounter].userinfo
, value allclaimants[allclaimantscounter].userid
?
thanks
you convert array list
array.aslist(array)
and use linq like
list.orderby(x=> x.key)
and depend on type of dropdrown have fill it, if dropdown aspnet server control use list datasource.
Comments
Post a Comment