How to use DataGridView Control in C#

  Рет қаралды 209,523

Programmers Nerds

Programmers Nerds

Күн бұрын

Пікірлер: 71
@fallingman8470
@fallingman8470 2 жыл бұрын
That cursor is so visible! I had no trouble locating the cursor during this video. 10/10
@dreirxge
@dreirxge 2 жыл бұрын
Omg this is exactly what I need. I have absolutely no knowledge on how to use visual studio. Thank you very much. Have a nice day :)
@abdelmalektalbi7582
@abdelmalektalbi7582 4 жыл бұрын
I hate when my teachers take their time to explain what they're typing, explaining the obvious. Best tuto ever! one small detail ,it would have been a wonderful addition if you posted the code to...
@ProgrammersNerds
@ProgrammersNerds 4 жыл бұрын
We aim to provide hands on and direct to the point tutorials.
@christopherlikins6321
@christopherlikins6321 3 жыл бұрын
Thank you for this instruction. It is very clear and well stepped through on the procedure.
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
Glad you enjoyed it!
@dineshodedra4460
@dineshodedra4460 3 жыл бұрын
Great video. I'm new to C# but have lots of "lapsed" coding experience. I loved the way you created the class objects and the list to use with the grid. These tutorials are for beginners so it was perfect. I have seen so many othe tutorials that make the guy on the video sound clever but they struggle to get the main objective across. For completness, you could have updated the data in one of the cells with the text you edited. Great work, keep it up
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
Thanks for your feedback. I try to make short vids, busy days nowadays
@scarr6606
@scarr6606 2 жыл бұрын
At 2:36 you remove "throw new NotImplementedException();" and I receive errors when I remove it. Any suggestion's?
@viktoria7don
@viktoria7don 5 ай бұрын
Мужик, ты лучший, просто это знай
@ProgrammersNerds
@ProgrammersNerds 4 ай бұрын
Thnx 🙏
@jesusstudentbrett
@jesusstudentbrett 2 жыл бұрын
I certainly appreciate your work and sharing this, but just a heads up; the audio is just barely loud enough (youtube max volume and my PC on max volume).
@ProgrammersNerds
@ProgrammersNerds 2 жыл бұрын
Thanks, they were recorded with laptop mice so I understand you its a bit low :(
@oscaraward6187
@oscaraward6187 4 жыл бұрын
Nice tutorial but how do I update the data as well as add and remove rows? I added an update, add, and remove button but I'm not sure what code to use.
@Lhsbysareena
@Lhsbysareena 3 жыл бұрын
Add databound button In the button click event you can give operations code
@hemalpatel9708
@hemalpatel9708 2 жыл бұрын
You can Add record directly to the list instead because I think Data grid view will use the list to display data, but you might have to update the data grid view
@hemalpatel9708
@hemalpatel9708 2 жыл бұрын
Nice tutorial, It helps me to create a view for data using data grid view, before I was creating custom UI for editing and viewing purpose, but Now I decided to use custom UI to provide basic data to user for records and use data grid view to view all data to user! Thanks a lot!
@ProgrammersNerds
@ProgrammersNerds 2 жыл бұрын
i'm glad you've found it useful. peace!
@陳昱辰-e5p
@陳昱辰-e5p 5 жыл бұрын
This is really really helpful ! !
@ragtop63
@ragtop63 3 жыл бұрын
Excellent video! Also, it sounds like your computer's fan curve is very aggressive lol
@williamazz2113
@williamazz2113 2 жыл бұрын
Excellent tutorial. Great style. You covered the perfect amount of information for a complete sample solution. Thanks for sharing.
@ProgrammersNerds
@ProgrammersNerds 2 жыл бұрын
Thanks Will
@Laugny
@Laugny 3 жыл бұрын
it says inconsisten accessability: property type 'list' is less accessible then Property 'Form1.People'
@Laugny
@Laugny 3 жыл бұрын
i fixed it lol
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
good (Y)
@danielruzsik6440
@danielruzsik6440 3 жыл бұрын
@@Laugny how did you fix it?
@Laugny
@Laugny 3 жыл бұрын
@@danielruzsik6440 Ohh, im sorry i dont know anymore, this project is about 3months old and i dont have a clue how i fixed it, but it wasnt that hard i think
@danielruzsik6440
@danielruzsik6440 3 жыл бұрын
@@Laugny not a big deal, thanks anyway :D
@sarimsheikh140
@sarimsheikh140 7 ай бұрын
Sir how do u duplicate using drag ?????
@tomd5678
@tomd5678 4 жыл бұрын
Great, I learned some good stuff
@ProgrammersNerds
@ProgrammersNerds 4 жыл бұрын
Subscribe, will post some more
@krastinabrunson34
@krastinabrunson34 3 жыл бұрын
Awesome, you helped me understand dgv. Thank you. Do you logically after of course learning you figured how to set button or text box controls?
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
Every time you update the dgv, you can set text property for example to count number of rows or so.
@krastinabrunson34
@krastinabrunson34 3 жыл бұрын
@@ProgrammersNerds I did that but the Delete is not working in random order with the code. It just deletes 1st,2nd,3rd, when i try to select 5th it deletes the 1st. How do set it up to work at random selection of row?
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
@@krastinabrunson34 every control in Windows Forms, has a Tag object property, you can attach your object here, like a class instance which represents your row, and then you have to get the selected row, through dataGridView1.SelectedRows[0], and then you get the object from .Tag and cast it to your object. and in the object you will have some sort of ID that represent your PrimaryKey i your Table. If you have problems, please share your code and I will be glad to help.
@mejmeiji2008
@mejmeiji2008 3 жыл бұрын
I hope there's a button to enter then view in datagridview
@tomljenovicvid61
@tomljenovicvid61 2 жыл бұрын
Is it even possible for me to load pictures from online database in fowlayoutpanel, then on click enter a new form with only selected object (i managed these two things) but then I want to have a button "add to cart" which is a completely separate form. The cart should be consisted solely of datagridview which collects products added to it. Right now I can only showcase each last added product. It seems they dissappear as soon as I leave the form (cart) with datagrid on it.
@ProgrammersNerds
@ProgrammersNerds 2 жыл бұрын
Of course, usually online images or files rely on some file server to be served, and accessed via urls. Having accessed the resources and created image objects you can displat them anywhere
@bashayerm2412
@bashayerm2412 2 жыл бұрын
Hi I have problem in passing data in grid view, if it’s possible can you help me Thank you
@ProgrammersNerds
@ProgrammersNerds 2 жыл бұрын
Any IEnumerable, IList passed to the list.DataSource will work
@emregecer1216
@emregecer1216 3 жыл бұрын
Hi, i'm trying to write program which is has to connect ftp server and take , add and delete data data from server. I have no idea how to do it. i have server http address also id and pass. Can you show us how to do that if its not so hard? i watched some videos already but they have path of files, I dont have path just address of server
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
Hi Edgar, this is what you need to do (an example): using (var client = new WebClient()) { client.Credentials = new NetworkCredential(ftpUsername, ftpPassword); client.UploadFile("ftp://yourfile.txt", WebRequestMethods.Ftp.UploadFile, localFile); }
@limtseng7157
@limtseng7157 4 жыл бұрын
thank you, this is really helpful.
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
Glad it was helpful!
@ardiansanando59
@ardiansanando59 3 жыл бұрын
thank you very much!!
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
You are welcome
@dimankan
@dimankan 3 жыл бұрын
i want to see more about datamember, datasource and binding
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
Binding is so easy, for your reference. DataSource accepts all sorts of IList, DataMember is the value of the column from the dataSource SET, DataValue is what is returned on the click. Please, see other videos as I believe I have used it somewhere.
@JoshuaPraiz
@JoshuaPraiz 6 ай бұрын
Awesome!!!
@unabletoluxury
@unabletoluxury 3 жыл бұрын
Thank you very much
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
You are welcome
@adematabag9161
@adematabag9161 3 жыл бұрын
Could you please comment me the shortcut keys you use? You are coding very fast.
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
Hello Adem, coding fast is because of my experience with coding. let me give you an example. if you want to write code like Console.WriteLine / / use write Console.WL + Tab it generates automatically. If you want to create a property on your class then write: prop + double tab, etc etc.
@yigitkeles3217
@yigitkeles3217 2 жыл бұрын
4:53
@Ravenovskii
@Ravenovskii 4 жыл бұрын
DUDE YOU ARE SO FUCKING AMAZING
@VarunKumar-qd5wl
@VarunKumar-qd5wl 4 жыл бұрын
Thank you
@ProgrammersNerds
@ProgrammersNerds 4 жыл бұрын
Did you subscribe?
@ninnaahk
@ninnaahk 4 жыл бұрын
but did you subscribe tho? :'DDDD
@ProgrammersNerds
@ProgrammersNerds 4 жыл бұрын
@@ninnaahk did you :D
@mikaverhoeven3513
@mikaverhoeven3513 8 ай бұрын
drag n drop, really man?
@antoni9001
@antoni9001 4 жыл бұрын
Good movie
@dimankan
@dimankan 3 жыл бұрын
спасибо
@RonTDC
@RonTDC 3 жыл бұрын
Great video, but you type superfast lol
@ProgrammersNerds
@ProgrammersNerds 3 жыл бұрын
Used to do 120wpm, now Its less 🤣
@kenwatson378
@kenwatson378 4 жыл бұрын
Seriously? You cant build your project and class ahead of time. I know how to create a class and add items to a list. Why waste everyone's time by not setting up ahead of time so you can show us what the video was SUPPOSED to be about?
@FiksIIanzO
@FiksIIanzO 4 жыл бұрын
Because it takes very little time and complete newbies watch these videos along with rusty professionals. The newbies would be lost without a proper step-by-step. If you're a huge dude and your time costs five bucks a second, read documentation. That's dense and quick if you know what you're doing. Otherwise check your attitude.
@Barbarossa-jb6cv
@Barbarossa-jb6cv 2 жыл бұрын
public partial class Form1 : Form { SqlConnection con = new SqlConnection(@"Data Source = LAPTOP-2A5CNVC3\SQLEXPRESS; Initial Catalog = Countries; Integrated Security = True"); SqlCommand cmd = new SqlCommand(); public Form1() { InitializeComponent(); } private void btnClear_Click(object sender, EventArgs e) { dgvShowData.DataSource = null; } private void btnExit_Click_1(object sender, EventArgs e) { Application.Exit(); } private void btnShow_Click_1(object sender, EventArgs e) { try { con.Open(); cmd = new SqlCommand("Select * from Coutnry", con); cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dtable = new DataTable(); da.Fill(dtable); dgvShowData.DataSource = dtable; con.Close(); } catch { MessageBox.Show("Error 404"); } } private void dgvShowData_CellContentClick(object sender, DataGridViewCellEventArgs e) { } } }
@vicenzovendetta3443
@vicenzovendetta3443 2 жыл бұрын
Thank you
How to convert c# object to json, (serializing to json)
5:27
Programmers Nerds
Рет қаралды 6 М.
WPF Controls with MVVM: DataGrid
24:59
IAmTimCorey
Рет қаралды 175 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
C# Events and Delegates Made Simple | Mosh
32:04
Programming with Mosh
Рет қаралды 954 М.
C# Events - Creating and Consuming Events in Your Application
1:09:13
5 Good Python Habits
17:35
Indently
Рет қаралды 659 М.
JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
12:35
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
15 Years Writing C++ - Advice for new programmers
4:04
SyncMain
Рет қаралды 1,3 МЛН
Chinese app design: weird, but it works. Here's why
10:51
Phoebe Yu
Рет қаралды 576 М.
"Clean" Code, Horrible Performance
22:41
Molly Rocket
Рет қаралды 926 М.