Click here to Skip to main content
14,766,249 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

String[] tempData = {
                            numberOfUsers[0], /*title*/
                            numberOfUsers[1], /*FirstName*/
                            numberOfUsers[2], /*MiddleName*/
                            numberOfUsers[3], /*LastName*/
                            numberOfUsers[57], /*Email*/
                            numberOfUsers[15], /*StreetName1*/
                            numberOfUsers[16], /*StreetName2*/
                            numberOfUsers[21], /*Country*/
                            numberOfUsers[19], /*State*/
                            numberOfUsers[20], /*PostCode*/
                            numberOfUsers[18], /*City*/
                            numberOfUsers[37], /*HomePhone*/
                            numberOfUsers[40], /*MobilePhone*/
                            numberOfUsers[31], /*WorkPhone*/
                            numberOfUsers[36]  /*Fax*/
                      };

listUser.Add(tempData);




gridview1.datasource = listUser;
this statement not working as I intended. I want each element in list array as separate Row in Gridview.

Can anyone please help me?
Posted
Updated 14-Oct-10 22:24pm
v2
Comments
Dalek Dave 15-Oct-10 3:24am
   
Minor Edit for Code Blocks

1 solution

write this after gridview1.datasource=listUser;

gridview1.DataBind();
or
this.DataBind();
   
Comments
Sandeep Mewara 15-Oct-10 3:47am
   
Comment from OP:
I did like that only but here I pasted reverse...

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