Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to assign data from binding source to Dictionary or Array or List
I got error when I use like this
C#
var lists = (Display[])gridDisplay.DataSource;
Display[] arr = lists.ToArray();
Posted
Updated 6-May-14 20:17pm
v2

1 solution

if you bind items as below
C#
List<display> DisplayItems =//get items;
gridDisplay.DataSource =DisplayItems;

then you can get it back like below
C#
List<display> result= (List<display>)gridDisplay.DataSource;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900