Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
[URGENT]: Cannot bind DateTime to UltraGrid (value not showing)
posted

I'm using UltraGrid (v14.2.20142.2092), and binding to a collection of objects that have datetime properties. These are not being displayed on the grid, but the other non datetime properties are. How do I bind DateTime properties to an Ultragrid and have it displayed in a format that I specify.

Example:

class MyObject {

  int Key {get; set;}

  DateTime Date {get; set;}

}

var listToBind = new List<MyObject>();

listToBind.Add(...)

this.UltraGrid1.SetDataBinding(listToBind, string.Empty);

NOTE***

Please provide example code to achieve what I am trying to do.

Parents
No Data
Reply
  • 1980
    Offline posted

    Hello HRS, 

    I believe the reason for that issue is the inaccessibility of the properties in the MyObject class. As they do not have any access modifiers specified they are set to the default accessibility of class members, which in C# is private. This makes them inaccessible due to the protection level.

    Please find attached a simple sample project that binds an Ultra Grid to a list of MyObject objects as you requested.

    If this does not help, could you please attach a sample project in order to provide me with more information needed to investigate this issue further.

    Infragistics Controls.zip
Children