How to Add, Save, Print and Delete Data from DataGridView in Visual Basic.Net

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys this a visual basic tutorial of a data grill management system with add function print save reset delete and that's it first of all let me show you guys how to delete ones if I click on any of these though you might not be able to see the delete because it's all said data and look at that it can delete it all so you just select whatever you want to delete and there we go there supposing we want to reset reset and add some other new data in there and the name this time is let's just say daily Sampson and the mail address is number seven oh right mobile number and email address daily and Gmail only to do is to click on the add local ads al-qaida three daily teachers in there and I can also add a link if I want to look at that I only have just one day lead and the silh have another person there called Henry their results and their resultant remember is but little bit Isabel - and he leaves and let's say of his own nightmare okay telephone number email and so all we need to do this part there's details so what I'm going to do you nice to take you guys straight into Visual Basic development environment in Visual Studio 2019 so let's do that now Bryce hi and welcome to visual studio 2019 in this tutorial I'm going to be working on Visual Basic and the component we can work enough would be the data gravy which is part a request of one of my viewers out there who will like to know how to save delete add and print so let's click on create new and then we select a preparer window forms application which you basically conduct and click on next okay I'm just gonna give it a name and we'll call that BB on the score data disagreed view and missed all save alright so let's click clear now that the form is ready I'm now going to go straight to the property unless enhance the size of this form so I'm gonna make that approximately one thousand three hundred and eighty six by eight hundred there okay the next thing I like to do is to go straight to the tool box here and let's select data grevioux there and I'm going to now add some text box so at the end of this tutorial we should be able to save straight into Excel whatever content we have on the data grid view so let's add a text box I will also meet a level that's probably okay we need about in as well later alright any panel somewhere here from my buttons and a little there we go right let's enhance the look of this whole interface so for this okay so this is how is looking now although is now finished yet so the next I like to do is let me come to where I will have all the components I need I'm gonna need a menu then double click on that I will also need trains document and print 3d free print preview dialog right yeah does it but Kahless multi-star little beads are the widest we'll just copy these buttons okay now the next thing is you see these disagree view I'm gonna click on this little rectangle there and I will now uncheck editing I never editing get rid of that and about unity rid of that and let's click on order so the force column I'm gonna called our student as a student and the school ID that's Debbie my first column the second one I'm gonna enter student name your first name add another one so name and finally that would have into email okay there's the details or lease our students now for this one the buttons as changes to delete or the first one like the first one behaves that one big exit wouldn't be a exit to you the next one that is going to be known as delete this one let's pin this down DTA delete the content NH is gonna be delete followed by the next one here that's gonna be reset and so on so let's come up here just call this on BT and use it and if I'm going off to add mom I will do that I'll let you guys know this one's gonna be maybe we just call that one part meal so that's BT allowed me come right down here just odd then tell daddy now that's is taking care of the CD panel itself that's it's my planet right yeah I'm gonna comment straight to the properties and let's change the border style of the planet I'm going to just make that's fix single alright that's that's that done okay let's double click on these exits itself but I'm not gonna eat any code in there what I'm just gonna do is to declare a function for these exits and call that function must come back he may just call it me exits meat exits and enter practices there press ENTER and in da I'm going to declare the following game I exit as dialogue dialogue result today and I exit system to how the fallen air is it equals message box that should confirm let's enter port here confirm if you want to exit close that , and the name is just going to be a citator system and enter another comma here as a message box poor thing that's yes no and the final argument is going to do message box icon let's see message box icon that's I'm gonna call that information just link that there like that day and now use an if statement if I exit because dialogue results dot yes then application application dot exit the whole recently the whole reason why I decide to write in this weekly so that we can prompt the user to confirm if they want to exit or not okay now that I've created that that's it's my phone shop for exists that I just need to do is to copy the name of the function and paste it inside my exit button this is my exit button a double click on that and paste it right there now let's come in here you will now see what I've written a function for the exit now inside the main strip this is going to be known house file and underneath here if you like you can call it a meal and in here and talk French yeah I need a print button here as well and I'm gonna hold it save then let's exit now you get the old ideas for comrade yeah Cordy spelling does wrong swollen here let's select it and go to the property get it right there will be filed okay double-click on exits and just paste my function exit function dear Duchess that taking care of now in here I will need another bottom cooperate so change that to prints and that's gonna be BTN frames right okay let's take care of all these components here so this very one is going to be known as txt student ID and the label itself I'm just gonna call that so ID the then the next label here asking to be first name so I guess you guys get the whole idea of that so I'm just gonna name every single component and just like a half on the columns here and I'll come up to you guys as Mussa finish that okay guys that is how it looks now however for the gender will have to delete that and let me add a boom box there there we go okay for the boom box I can just punch straight down here and just enter my details here let us into the male and female right by let's increase the font size of Delta swirl to use 16 alright so let me take care of let's take alpha reset and deletes first of all let's take it the delete that's what the delete I'm just came to enter our years use a for loop each I will call that roll that's is us data will reveal that's a preview there we go right there the third reveal role in dat'll you v1 dot select hide selected roll yeah for its role inside it's a preview in nature gravy one that selected food but I wanted a to preview one is that in there I want you to be those dots that is my object there that is the deletes taking care of so you take a good look at that the ledge is taking care of exit is taking care now let's take care of another one so I'm going to take care of your sets as for the research I'm just gonna use for statement as well copy that and let's say Dean txt and for each txt then me that control and then we'll just say if type of if typeof txt is textbox then do as follows CXC attacks he was player there that should clear whatever content I have in there so I can just sit next EST right so let me run it and try all of these codes out all right let's try out resets apart from this I'll be able to reset these yet so click on that touch is fine now let's try out exit exit is working and coming here exit works as well the French is not working hard meal is not working and I need one more and it's safe okay now come right down here click on add new drag it down here doubt before my save let's give that it names save they and that is going to be known as PT and save that is fun now you see these I want to be able to add whatever content I have in here okay so I'm going to double click on time in and I'll just enter disagree view one get a preview wonderful dot r dot rose dot odd yeah on what am i adding and adding TXE students ID detects come out CXC first name dot tex TFC so named of tanks and that is for those puppies then you can SP SS old man team sexy bring this song around a half that's little better yeah happy to pay them we have checked out so day to bed Tama let's see CMB gender dot Thanks the corner there without txt the thing that would maybe address dot Tex let's see ya then we have mobile phone and the other one so we'll press ENTER CXC dots mobile the text there should be a comma here and from our TLC that will be email the text there and that will show you that whatever data happened there so let's try it out so let's add some value from data in there and hear the name is very tall oh man they took beds and let's come here gender male address number one to be T mobile number email address G let's see if we can add there we go look at that - yeah that's funny okay the odd new is working that's good now what about friends and save so every other thing is working about a partial print and save okay what about is our new here so just then charging lines of code is where one you can copy that as well and just paste it in there let's go about comido click on this name taste yeah as that's done okay let's take care of print and and save okay now help my print but what I'm going to do first is I'm going to declare the following right private bitmap as big mouth but instead of being writing my print function in here I'm going to write it underneath year oh that's right up right underneath you so and let's just change the name to I print press ENTER right here I will enter the following I'll say in there deep height as in teacher and it's integer equals as follows this integer equals data photography 1.8 apresenta why this data reveal height itself space that death equals data graph in one dots roll can't dot okay um you there multiply that by ten without this multiply that blind date I'll give you one copy and paste dots template don't hunt yeah there we go all right now the next thing so it's going to be we have to call the beatmap to just bead up up there we go right so I will now copy this function here I'm gonna piss that's right inside the button that is the better now it also come up here we have my father double click on this menu here under space that India is still not gonna walk one more thing that is left for us to do is to double click and print document okay on the prints document itself we enter the following alright so what I'm gonna do now I'm gonna have to give that a try so these are the lines of code for frames you get as the function trader footprint does we have called a function using the bottom calling the function again using the menu there's a single line of code on the print document so let's run it and see okay student number and the name is going to be lady little jump Little Joe literature Dallas it's a bit of Little Joe Dallas 17 [Music] okay Little Joe tell us they smell ugh gross ease for dainty I will takes us ton over tumblr there we'll go email little job that's Gmail that's cut yeah let's add ducks to see that lice now the the facts is we just want to try out the buffing clicking on the butter there we go girls look at that that's nice okay let's try to yes well yeah that's how the French is working so all that is left for us now is to take care of save so exits yeah now let's go to the exit but as early save button it double click on save and right in here but before before I can do anything here I need to import the following so right above the public plaza form from one having porters photos I don't need it all BOTS okay the next thing we need to now do is to go to the project here because we need a reference so click on add reference and what we're looking for is the Microsoft Office so less plumbing two extensions and less for write down in Microsoft Office interval for Excel there we go so I'm going to select this better one I just click on the check box and click on OK there will okay now let's come in here okay yeah I'm saving right there so right underneath you and your entire function okay those are the lines of codes and I'm going to now quote and what a cold is your function here copy that I will call it right inside this button double click on that button paste that in here and that is that now let's go on to yeah we have save us or click on down and paste up now let me show you guys the function so that you can pause your video and just type it all out they will do take it from here that functional app just called to spoil our fascia school right down and again and day does it and that you guys can see it so I'm going to run the program now ASHRAE latency here we go there we go so I will just enter some student details there and the name of the student is relax it's totally okay let's go alright that's fine whatever and [Music] date of death is and the 14th but gender male dress number three Walter okay let's call it Porter Road whole town would year three or toilet I like that music it does it and email of Felix Felix I'll gmail.com or we just need to do is artists I'm just favorite are these dusky party details in there okay as you can see look at it day today we need two sons in this round there alright all just need to do that is before fixing the date of death so we need to come up here or here save click on save okay guys so I'm just gonna give that today let me just call it I would call it all time out there so this exhale drop that down selected cell click on save there we go so now open it up they see that the same ISA is exported successfully click on ok so let me try and open that up on my desktop and see the desktop rights right there where is it all time we'll go double click on it we could minimize this now Excel is opening up and deal with Oh guys say that does how use export or save fun it's a great view on to excel there that is that done apart from this the error here think I think all this all right let's close that I'm going to say no there we go second exit output folder has see this works the research there apart from this I need to be we have declared out as well okay exits let's see let's it deletes need to try out the weeds select one of these and let's assume I have some unnecessary data in a and let's try it out deletes so our dad's look at the informational of just Rd so select it and click and delete there we go you see the delete works does bit so it's it yeah don't save now let's come in here and find out why all of these data's will not saved they thought that that was supposed to be dot Tex that is that's taken care of another minor error that I need to take care of his justice this very one so let's go to resit because I should be able to reset it so right in here and reset is called C then B yep dog tags is a clip right that is taking care of us well now one final thing you see these buttons I need to fill them up okay I need to feel up the panel with these buttons I'm gonna speed down and get back to you guys all right that is taking care of as well guys look at that so I'm now gonna run it let's give it a final run and see how it all looks like yeah we'll go guys so let's enter some data in there student ID let's call that st student and the name of the student and minute just called gently they perfect and gender mail address 7 yellow mobile number/email [Music] there's obviously and even that comes only to do is flick on hard there with the bus yeah and that is how you create your own disapprove you with add function print function save reset delete and exit using Fisher Studio 2019 application use Visual Basic so without guys I'm gonna call it the end of this tutorial suppose you same choice your live a nice day now and please do subscribe and join to be a member of this channel bye for now
Info
Channel: DJ Oamen
Views: 41,752
Rating: 4.8762889 out of 5
Keywords: How to Add, Save, Print and Delete Data from DataGridView in Visual Basic.Net, How to Add Save Print and Delete Data from DataGridView in Visual Basic.Net, Save Print and Delete Data from DataGridView in Visual Basic.Net, Add Save Print and Delete Data from DataGridView in Visual Basic.Net, Old Town Road, Visual Basic.Net, Visual Studio 2019, Anthony Joshua
Id: CGyn4Deo6fA
Channel Id: undefined
Length: 33min 48sec (2028 seconds)
Published: Sat May 25 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.