In vb.net application, I have a dgv. the data from dgv are transferred to textboxes when row are selected. I print these textbox as report using e.graphics. after printing perticular row data , that row is removed from dgv. (i filtered the dgv by "NotPrinted").
I want with a single button command, all the rows data printed one by one untill the dgv becomes empty.
I tried much but not getting the result.
Satyam_1
0
Junior Poster
Recommended Answers
Jump to PostHi Satyam,
if my understanding is correct maybe you can try this code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim col1 As String, col2 As String, col3 As String 'if dgv is autogenerated For i As Integer = 0 To DataGridView1.Rows.Count - 2 …
Jump to PostHi Satyam,
yes this code is working based on your requirements. But I have made a modification of the code to follow the requirements based on my understanding. So using Northwind database:
Imports System.Data.SqlClient Public Class Form1 'handle cellenter event for data selection from dgv to textboxes, …
Jump to PostSince you are using a typed dataset, you just need to modify your dgv Design name. Right click to your dgv and select edit columns, or from Properties menu, select Columns then press Collection ellipse button. At edit columns Property menu, click on the PatientName then change its Design (Name) …
All 11 Replies
Hardz
15
Light Poster
Satyam_1
0
Junior Poster
Hardz
15
Light Poster
Satyam_1
0
Junior Poster
Satyam_1
0
Junior Poster
Hardz
15
Light Poster
Satyam_1
0
Junior Poster
Hardz
15
Light Poster
Satyam_1
0
Junior Poster
Hardz
15
Light Poster
zelrick
-1
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.