forum

Home / DeveloperSection / Forums / Data binding in XtraGrid control

Data binding in XtraGrid control

Anonymous User 3799 19-Apr-2012
I want to bind a datasource in XtraGrid control but I am not able to do it. Problem is that I had created columns in XtraGrid at design time and I am binding records a run time using a user difined collection.

I had created 4 columns in XtraGrid at design time. First one is CheckBox type, second and third one is Default and last one is Button type.

I had create a structure in my program which is as follows

public struct Test
{
      public bool IsSelect{get; set; }
      public string First{get; set; }
      public string Second {get; set;}
}

Then I had created a List collection which contains 10 Test type record. for binding I had written following code

grid1.DataSource = userList;

Now I want to bind this record in XtraGrid control. IsSelect property should be bind with CheckBox column and rest two property will bind with second and third column.

Please help me to solve this issue. Is it possible in XtraGrid.

I am using visual studio 2010 with .NET Gramework 3.5 and C# language.

Thanks.

c# c# 
Updated on 19-Apr-2012
I am a content writter !

Can you answer this question?


Answer

0 Answers

Liked By