getting next row data into focus
-
I have created a windows form using C# / ADO.Net that contains textboxes that are populated at initialisation with the contents of the first row of a dataset - works well. I don't specify the actual row because the SELECT query returns the rows in the desired order. What I want to do is have a "next" button on that form populate the textboxes with data from the next row. 1. Can I just execute some onClick code to do this easily and if so where can I locate an example code? 2. I'm just learning ADO.Net as well as C# and would appreciate pointers to where I can find some good tutorilas on the net to help me particularly with database access/manipulation. TIA. Glen Harvy
-
I have created a windows form using C# / ADO.Net that contains textboxes that are populated at initialisation with the contents of the first row of a dataset - works well. I don't specify the actual row because the SELECT query returns the rows in the desired order. What I want to do is have a "next" button on that form populate the textboxes with data from the next row. 1. Can I just execute some onClick code to do this easily and if so where can I locate an example code? 2. I'm just learning ADO.Net as well as C# and would appreciate pointers to where I can find some good tutorilas on the net to help me particularly with database access/manipulation. TIA. Glen Harvy
Hi Glen, You may want to check this link http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkwalkthroughdisplayingdatainwindowsformusingparameterizedquery.asp Hope it helps --Dimple
-
Hi Glen, You may want to check this link http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkwalkthroughdisplayingdatainwindowsformusingparameterizedquery.asp Hope it helps --Dimple
Thanks for the reference. It's close enough for me to learn from :) Glen Harvy
-
I have created a windows form using C# / ADO.Net that contains textboxes that are populated at initialisation with the contents of the first row of a dataset - works well. I don't specify the actual row because the SELECT query returns the rows in the desired order. What I want to do is have a "next" button on that form populate the textboxes with data from the next row. 1. Can I just execute some onClick code to do this easily and if so where can I locate an example code? 2. I'm just learning ADO.Net as well as C# and would appreciate pointers to where I can find some good tutorilas on the net to help me particularly with database access/manipulation. TIA. Glen Harvy
If you are using the Visual Studio IDE, there is a template form for data. The wizard will ask if you want to display one record or multiple records. Selecting one record will generate a form that has the text boxes for editing data values as well as the navigation controls. The code generated should be very similar to the example you've already seen. For a simple application it might be close to what you need without all the cut & paste. >>>-----> MikeO
-
If you are using the Visual Studio IDE, there is a template form for data. The wizard will ask if you want to display one record or multiple records. Selecting one record will generate a form that has the text boxes for editing data values as well as the navigation controls. The code generated should be very similar to the example you've already seen. For a simple application it might be close to what you need without all the cut & paste. >>>-----> MikeO
Mike Osbahr wrote:
If you are using the Visual Studio IDE
I am. Thank you for this - I'm learning the IDE as well so you've helped with two areas that I need development on :-D Glen Harvy