Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i can pass the list to my gridview control. But it doesn't show me the data's. i put breakpoint to see the datas, its assign well to datasource. why its not shown...


Code Sample:

Test.cs
C#
new frmPersonalInfo().FillGrid(new XPCollection<CustomerInfo>(XpoDefault.Session));

frmPersonalInfo.cs
C#
public void FillGrid<T>(XPCollection<T> collection  )
      {
          IList list = new List<T>();
          foreach (object item in collection)
          {
              list.Add(item);
          }
          gridControl1.DataSource = list;
      }
Posted
Updated 31-May-13 1:38am
v2
Comments
ZurdoDev 31-May-13 7:55am    
Possibly trying calling gridControl1.DataBind();

1 solution

You Have not called DataBinding.
C#
public void FillGrid<t>(XPCollection<t> collection  )
      {
          IList list = new List<t>();
          foreach (object item in collection)
          {
              list.Add(item);
          }
          gridControl1.DataSource = list;
          gridControl1.DataBind();

      }
 
Share this answer
 
v3
Comments
sencsk 3-Jun-13 0:49am    
gridControl1.DataBind(); in this databind method is can't retrive. in devexpress gridcontrol.

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