![]() strDestinationFile = "C:\\titaniumdocs\_export\temp\output. I tried the following but it gives me an error. I do not understand how to use the control with a web form in web developer. If you are using Visual Web Developer, the control you are looking for is DataGrid control that is asp.net control It is available for Windows Forms Applications and is available in VC# Express, VB Express, VC , VJ# express editions. Tw.Write(DataGridView1.Rows(count).Cells(count2).Value)ĭataGridView is a Windows Forms Control. Tw.Write(DataGridView1.Columns(count).HeaderText) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clickĭim numCols As Integer = DataGridView1.ColumnCountĭim numRows As Integer = DataGridView1.RowCount - 1ĭim strDestinationFile As String = "c:\\output.txt"ĭim tw As TextWriter = New StreamWriter(strDestinationFile) the code will output the contents of the DGV to a txt file in the click event of the button, add the following code. DataGridView1 is the name of the DGV on the form.Ģ. For Each cell As DataGridViewCell In row.Cells pdfTable.AddCell(()) Next Next 'Exporting to PDF Dim folderPath As String 'C:\PDFs\' If Not Directory.Exists (folderPath) Then Directory.CreateDirectory (folderPath) End If Using stream As New FileStream (folderPath
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |