Avatar of AdibRahman77
AdibRahman77Flag for United States of America

asked on 

Binding Winform DataGrid

Hi All,

What is the best way to bind a Winform DataGrid.  All my Data is coming through a webservice e.g I have CustomerResults[] array returned from the service method

What is best way with performance to bind to DataGrid.
Should I create a DataTable from CustomerResults[] array Collection and  Then bind it to the DataGrid. Or any other way?

Thanks in Advance
C#.NET Programming

Avatar of undefined
Last Comment
jinn_hnnl
Avatar of Jens Fiederer
Jens Fiederer
Flag of United States of America image

You can bind an array of objects DIRECTLY to the DataGrid's DataSource.
SOLUTION
Avatar of Yurich
Yurich
Flag of New Zealand image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Jens Fiederer
Jens Fiederer
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Jens Fiederer
Jens Fiederer
Flag of United States of America image

In this case, of course, the Datagrid autogenerates the columns.  If you have columns that do NOT need to be displayed, you will have to turn off the autogenerate and list the ones you DO need.
SOLUTION
Avatar of jinn_hnnl
jinn_hnnl
Flag of Netherlands image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo