Check the website: mkasoft.com/in... to see all database video tutorials. A simple how to showing adding a buttons to rows in DataGridView bound to a table.
To get the last row from datagird view use: FileName=DGV.Rows(DGV.Rows.Count-1).Cells("FileName").Value So if you want the one before, subtract another and so on.
The "FileName" could be replaced with the column name that represents the file. So if the column name is "fileloc" then the code could be: FileName=DGV.Rows(DGV.Rows.Count-1).Cells("FileLoc").Value you are just telling VB which column you want to get from the table by specifying the column name.
First of all I want to say thanaks for this step by step guide. I have one question that you just drag the table into form and it show that table's data but I want to join another table so what should I do in that case? I want same drag method bcz it's easy :P
Dear Sr. Thank so much for your Great tutorial. I have seen it several times. I would like your help . The question that I have a client DataGridView . I have inserted a button en each row. But I need that once I click the bottom to open new form with the details of the requested client. (Edit the clients dates and saving) I will appreciate so much your answer. I send my best wishes from Valencia-Spain. . Emad Kamal Soudi
Hi there... You could detect the row and the column that is being clicked using the cell contents click event. Using that you should get the key value, and pass it to the details form. The details form should use this key value to filter the values in the fill method. I will try to do a tutorial about that but I will be away for few days, so can't say when would i do that.
@brigadehyd Hi there... Sorry for the late response. You could use an array of structure to read the information of students. I believe I made a tutorial on that. As for sorting, I made a tutorial about bubble sort that explains how it works+it contains the sorting code. You just need to compare against the student mark when sorting.
@Excelsoft Hi, usually you do this through SQL commands. I created a video showing how to do it on the website. Search for : "link a database table with itself " in the questions and answers sections. yours
Hi there... It is difficult to figure this out since it depends on your code. I assume the problem happens when you click the same cell twice or more. You could store the ID of the previous cell,in a variable, and check on that as soon as the event is fired. If the ID is the same, then no need to run the event, otherwise, update the variable and run the code.
If i want to add right click due to getting the value of any cell and use that in other proses which indicate by context menu how i should wright the code
@deathpedal Hi there... Create a date/time field in your database, and in vb.net the wizard should create a datetimepicker control and bind it to that field. If not you could drop such control and bind it to the field. yours
Thanks, yeslamo! I have a question regarding the DataGridView, is there a way, to show data from 2 records in one line, so for example, if i hv a 'Transactions' table, i wanna show each pair of transactions together, i.e. TransactionTime for in and out on the same line, and how can i get a handler, of both records, to, say, edit or something... shokran
Thank you for your tutorial. I faced a problem with database. When i try to create data source a error message show. The error message is "Could not retrieve schema information for table or view. Pls help me". I used VB 2010 and MS Access 2013.
Not sure why you are getting this error message, but you could add database connection to the solution, then create dataset manually and finally drag and drop the table form the server explorer to the dataset. That should work.
hello sir i need some help i'm doing same as show in ur video .in my _CellContentClick () i've writen some code which is deleting and creating controls dynamically in tablepanellayout(TPL) ; whch taks some time.it works fine in normal condition but if we continuously keep clicking on edit buttons or other cells of datagridview my TPL is completly messed up. is there a way to restrict next event firing b4 execution of previously fired event is completed.
Hi, can you help me with the codes, that everytime i click the Button that i have added on the DGV will display another form?. PLEEEAASSSEEe?. for my Project. Thanks in Advance. :)
Solved my problem, even in 2017 this is still coming up handy. Thx mate.
Glad to hear that. Thanks! ;)
And in 2018....:(
Great tutorial. Very Clear. and very precise.
Good job.
YOur videos are very helpful. You keep helping me in each video.. Thanks alot!!! You just earned a new subscriber
your video helped me to do the same thing but on c#, obviously I adapted the code for works correctly
dear Brother...your tutorial very well.....so very nice study ..thank you so much ........{ }
Thanks. Great example and explanation.
To get the last row from datagird view use:
FileName=DGV.Rows(DGV.Rows.Count-1).Cells("FileName").Value
So if you want the one before, subtract another and so on.
The "FileName" could be replaced with the column name that represents the file. So if the column name is "fileloc" then the code could be:
FileName=DGV.Rows(DGV.Rows.Count-1).Cells("FileLoc").Value
you are just telling VB which column you want to get from the table by specifying the column name.
ur tutorials r really superb!
First of all I want to say thanaks for this step by step guide. I have one question that you just drag the table into form and it show that table's data but I want to join another table so what should I do in that case? I want same drag method bcz it's easy :P
Thanks a lot dude: there is not direct info about this on the web... regards :)
Thank you Nice Video.....helpfull
hi there i have one help. is this any possible way to add one button for each two column thanks for advance..... Please help me
Dear Sr. Thank so much for your Great tutorial. I have seen it several times. I would like your help . The question that I have a client DataGridView . I have inserted a button en each row. But I need that once I click the bottom to open new form with the details of the requested client. (Edit the clients dates and saving) I will appreciate so much your answer. I send my best wishes from Valencia-Spain. .
Emad Kamal Soudi
Hi there...
You could detect the row and the column that is being clicked using the cell contents click event. Using that you should get the key value, and pass it to the details form. The details form should use this key value to filter the values in the fill method. I will try to do a tutorial about that but I will be away for few days, so can't say when would i do that.
@brigadehyd
Hi there...
Sorry for the late response. You could use an array of structure to read the information of students. I believe I made a tutorial on that. As for sorting, I made a tutorial about bubble sort that explains how it works+it contains the sorting code. You just need to compare against the student mark when sorting.
@Excelsoft
Hi, usually you do this through SQL commands. I created a video showing how to do it on the website. Search for : "link a database table with itself " in the questions and answers sections.
yours
Is there a way to set the buttons to bring up a file or image within the datagridview?
thank pro
Hi there...
It is difficult to figure this out since it depends on your code. I assume the problem happens when you click the same cell twice or more. You could store the ID of the previous cell,in a variable, and check on that as soon as the event is fired. If the ID is the same, then no need to run the event, otherwise, update the variable and run the code.
thank you so much
If i want to add right click due to getting the value of any cell and use that in other proses which indicate by context menu how i should wright the code
@deathpedal
Hi there...
Create a date/time field in your database, and in vb.net the wizard should create a datetimepicker control and bind it to that field. If not you could drop such control and bind it to the field.
yours
Thanks, yeslamo!
I have a question regarding the DataGridView, is there a way, to show data from 2 records in one line, so for example, if i hv a 'Transactions' table, i wanna show each pair of transactions together, i.e. TransactionTime for in and out on the same line, and how can i get a handler, of both records, to, say, edit or something...
shokran
thanks a lot..!!
I appreciate a lot if you give an idea to do some processing with the buttons
Thanks in advance.l..:)
awesome dude u rock :)
Thank you for your tutorial. I faced a problem with database. When i try to create data source a error message show. The error message is "Could not retrieve schema information for table or view. Pls help me".
I used VB 2010 and MS Access 2013.
Not sure why you are getting this error message, but you could add database connection to the solution, then create dataset manually and finally drag and drop the table form the server explorer to the dataset. That should work.
hello sir
i need some help
i'm doing same as show in ur video
.in my _CellContentClick () i've writen some code which is deleting and creating controls dynamically in tablepanellayout(TPL) ; whch taks some time.it works fine in normal condition but if we continuously keep clicking on edit buttons or other cells of datagridview my TPL is completly messed up.
is there a way to restrict next event firing b4 execution of previously fired event is completed.
Hello sir .. thx so much for respondind but it doesn't work for me .. what shall i do in "FileName" ???
pleaaaaaaaaaaaase !! i want to open a file wich the path is stored in just the row before the button ... give me the code please
Is it possible to add a table inside a tab control?
Hi, can you help me with the codes, that everytime i click the Button that i have added on the DGV will display another form?. PLEEEAASSSEEe?. for my Project. Thanks in Advance. :)
thank you sir Ia want data base acces calcul in the datagrid view vb
TO add button with Datagridview and database to delete row from data see that
czcams.com/video/W4UamMrJcpQ/video.html
hi can you post a video lesson on how to add date to ms access database using vb.net ty.. . pls help me
@crislolian
Hello Sir, Could you write your question in English please. I have no idea what your question is about.
yours
how to do it in vb6 pls tell
what about delete button can anyone please help? :)