asp.net - loop through datatable to create a string that looks like this -
i want loop through datatable column called sdescr , created string looks this.
dim labels string() = {"north", "south", "east", "west", "up", "down"}
this trying , not working
dim labels string() each row datarow in tablegraph.rows labels = labels " ' " + row.item("sdescr") + " '," next row
thank help, test them tomorrow , see works best , mark 1 correct.
do instead
dim labels string() dim labelslist list(of string) = new list(of string) each row datarow in tablegraph.rows labelslist.add(row.item("sdescr")) next labels = labelslist.toarray()
if need comma delimited list instead can do
dim commalabels string = string.join(labels, ",")
Comments
Post a Comment