Populating a DataGridView with Webservices

akerstiens
Member Posts: 15
Hello All:
I have been working on a C# program utlizing the new Web Services. What I want to do is populate and create new rows in a datagridview. I have been searching the web for some sample code, but have not been able to find any.
The only goal I have is use the readmultiple function of webservices from a page and have the datagridview populate with the results.
Thank you for your help in advanced!!
Aaron Kerstiens
I have been working on a C# program utlizing the new Web Services. What I want to do is populate and create new rows in a datagridview. I have been searching the web for some sample code, but have not been able to find any.
The only goal I have is use the readmultiple function of webservices from a page and have the datagridview populate with the results.
Thank you for your help in advanced!!
Aaron Kerstiens
0
Comments
-
Hello Aron,
Do you want to make any transactions from the WEB into the database through Gridview or just for viewing the Records in Gridview control??0 -
Sorry for the delay in awnsering your question. What I am doing is only reading the list of from WS.
Example of code:
WS[] Record = WS.ReadMultiple(filters, null, 100);
{
foreach (WS Record in Records)
{
Add a row to a Grid (WS.Field);
}
}0 -
I think you can do:
DataGrid.DataSource = WS.ReadMultiple(filters, null, 0);Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
If you want not to show all columns, you can build a datatable with the content of the array (create the columns you need) and then set the datatable as datasource on the grid.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Thank you all for your help I the "DataGrid.DataSource = WS.ReadMultiple(filters, null, 0);" was the key!!
Again Many Thanks!!!!!!!!0 -
Hello Akerstiens,
I am having a similar situation, did you use an intermediate data element? If you dont mind could you post your solution please?
Thank you,
Amol0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions