0
Reply

DataGridView and Json

Eline Sami

Eline Sami

Jul 23 2015 12:13 AM
468
Hello
 
in my windows form app, I have a datagridview where it is not bound to a data source, but it reads from different app.
 
the DGV looks like
 
Item No      Description            PRICE         ORIGIN
=====           ========            ======         ======
A150            (ABCD)                  50                  USA
B856            (ABCD)                  50                  USA
A896A         (ABCD)                  50                   USA
etc                (ABCD)                  50                  USA
 
I have an ArrayList that stores each item number that I read/select from the external app.
If for example I selected 50 items one go and all of these have same description, how can I add only one row to datagridview to have this description but the item No would store all the item number that is being selected.
 
Example, The DGV will add one row and fill the description cell with (ABCD), but the item number text filed will have a text (Multiple) and if I click it will show all the item numbers that I selected that had same description)
 
Is this possible by serializing and desterilizing JSON? I am new here and I red in the web the usage of Json, but still cannot get it.