hihi
i have a question that i want to ask about c# and window form
-
i have this data… A,B,C; A1,B1,C1; A2,B2,C2; (this data is not hardcoded, it can continue to change, when more data insert come in) , i select this database column which is name as ColABC , and i retrieve and put in the datagridview ,
So is possible to always get the middle data?….but it is always this format record1 data, record1 data, record1; record2 data, record3 data, record…and so i want this data all the middle value retrieve out to this become this B,B1,B2…….so on…ID | ColABC 1 | A,B,C; A1,B1,C1; A2,B2,C2;
This is like my DataGridView, the above.
The only thing i know is use split by ; first then by ,.
Is there any direct way?
Something like this, I try:
string[] doll = null;
doll = Convert.ToString(DGV.CurrentRow.Cells[0].Value).Split(';');
Basically like example the above code, doll get the ” A,B,C; A1,B1,C1; A2,B2,C2; ” this data which i retrieve from datagridview, so if i declare roll[0] it will give me “A,B,C”, like what i mention above the data will change so how am i get the middle value always??
1 Answer