I have this ListBox
.
Whenloadeditusesatxtfile
thus:
CodetoloadListBox
:
privatevoidfrmOrdemServico_Load(objectsender,EventArgse){string[]d=File.ReadAllLines(@"C:\Users\willian\Downloads\dbProdutos.txt");
foreach (var line in d)
{
string[] produtos = line.Split(' ');
lbProdutos.Items.Add(produtos[0]);
}
}
I have 2 problems:
1st The names of the products are not complete because where there is space is short: example: Liquid Soap, stays: Soap only. [resolved]
2nd I do not know how to bring the values of the products into another column within the ListBox, as I intend to use them. [resolved]
My file txt
is in this form:
Disregard data only call structure
Note: I read a bit on the internet about the ListView but did not I was able to implement it because I could not pass data on one side for another etc. And bring the two columns at last ..