•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 392,372 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,695 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser:
Views: 33306 | Replies: 1
![]() |
•
•
Join Date: May 2006
Posts: 13
Reputation:
Rep Power: 3
Solved Threads: 0
Hi all,
Please solve my Problem:
I have DataGridView and Dataset. I want to add data from dataset to datagridview row by row and not by using DataGridView.DataSource method.
For ex. following is the way to do the same using Vb.net
dgClient.Columns.Add("client", "Client")
dgClient.Columns("client").Width = 150
dgClient.Columns.Add("comments", "Comments")
dgClient.Columns("comments").Width = 250
Dim i As Integer
For i = 0 To dsClient.Tables("TableClient").Rows.Count - 1
dgClient.Rows.Add()
dgClient.Rows(i).Cells("client").Value = dsClient.Tables("TableClient").Rows(i).Item("Client")
dgClient.Rows(i).Cells("comments").Value = dsClient.Tables("TableClient").Rows(i).Item("Comments")
Next
How I can do above using C#
Thanks in advance
Please solve my Problem:
I have DataGridView and Dataset. I want to add data from dataset to datagridview row by row and not by using DataGridView.DataSource method.
For ex. following is the way to do the same using Vb.net
dgClient.Columns.Add("client", "Client")
dgClient.Columns("client").Width = 150
dgClient.Columns.Add("comments", "Comments")
dgClient.Columns("comments").Width = 250
Dim i As Integer
For i = 0 To dsClient.Tables("TableClient").Rows.Count - 1
dgClient.Rows.Add()
dgClient.Rows(i).Cells("client").Value = dsClient.Tables("TableClient").Rows(i).Item("Client")
dgClient.Rows(i).Cells("comments").Value = dsClient.Tables("TableClient").Rows(i).Item("Comments")
Next
How I can do above using C#
Thanks in advance
•
•
Join Date: Jun 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Hi all,
Please solve my Problem:
I have DataGridView and Dataset. I want to add data from dataset to datagridview row by row and not by using DataGridView.DataSource method.
For ex. following is the way to do the same using Vb.net
dgClient.Columns.Add("client", "Client")
dgClient.Columns("client").Width = 150
dgClient.Columns.Add("comments", "Comments")
dgClient.Columns("comments").Width = 250
Dim i As Integer
For i = 0 To dsClient.Tables("TableClient").Rows.Count - 1
dgClient.Rows.Add()
dgClient.Rows(i).Cells("client").Value = dsClient.Tables("TableClient").Rows(i).Item("Client")
dgClient.Rows(i).Cells("comments").Value = dsClient.Tables("TableClient").Rows(i).Item("Comments")
Next
How I can do above using C#
Thanks in advance
See www.akadia.com/services/dotnet_databinding.html
See ya
edreflak
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
Similar Threads
- Crystal Report & Code based Dataset (VB.NET)
- DataGridView Column Cell Style Formatting (C#)
- retrieve data by VB.Net (VB.NET)
- how to adding data in dataset (ASP.NET)
- Problem adding rows to database (C#)
- how to add rows to the child grid (ASP.NET)
- sending the number of rows...... (HTML and CSS)
- 2 ASP Questions (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: Saving Excel Spreadsheet using ADO.net gives inconsistent results
- Next Thread: help deciding a graduation project


Linear Mode