How does one add a table in visual studio and manipulate the data in that table ie insert, update and delete. not SQL table?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How does one add a table in visual studio and manipulate the data in that table ie insert, update and delete. not SQL table??

to create a gui app that has a table and some buttons that help to capture particular data(numbers) from text boxes and update the data in a table. I would also like to do some arithmetics on the data in the table. thanks

27th Nov 2016, 3:51 PM
kufre Udobong
kufre Udobong - avatar
6 Answers
+ 1
Depending on your needs, I'd say DataTable or create a class to store the information and store instances of that class in a collection such as List<MyClass> or Dictionary<KeyClass, MyClass>. Be careful when using a custom class as a dictionary key. Use a base system type if possible.
27th Nov 2016, 5:14 PM
Jesse Bayliss
Jesse Bayliss - avatar
+ 1
Ah, I misunderstood. I thought you meant a table to store the information, not for display. I am not familiar with blend unfortunately. But in Wpf you can create a datagrid on the form and bind it to a datatable. I'm on my phone so no samples right now.
27th Nov 2016, 5:39 PM
Jesse Bayliss
Jesse Bayliss - avatar
0
I do not understand...please could u make that clear??? I am using blend with visual studio and there should be a table control there ..what code do I use to allow more update the table using a button control
27th Nov 2016, 5:21 PM
kufre Udobong
kufre Udobong - avatar
0
could u please throw more light on the data table and maybe a code sample for updating inserting and deleting from that table. Thanks
27th Nov 2016, 5:25 PM
kufre Udobong
kufre Udobong - avatar
0
maybe you could help me with those lines of code when you do switch to your pc. I would be most grateful.
27th Nov 2016, 5:42 PM
kufre Udobong
kufre Udobong - avatar
0
the blend is just helping me avoid most of the coding I would be doing on visual studio ...asides that it does nothing else I know of. hope you wouldn't mind if u asked how I would bind that data grid to a data table.
27th Nov 2016, 5:47 PM
kufre Udobong
kufre Udobong - avatar