Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4116962
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:46:32+00:00 2026-05-20T22:46:32+00:00

I have a XtraGrid dropped on to a Winform. I have created 3 unbound

  • 0

I have a XtraGrid dropped on to a Winform. I have created 3 unbound columns named ID, StartTime and EndTime and set their unbound types as Int, DateTime and DateTime respectively.
I have created a class:


public class Data
{
    public Data(int id, DateTime startTime, DateTime endTime)
    {
        this.id = id;
        this.startTime = startTime;
        this.endTime = endTime;
    }
    private int id;
    private DateTime startTime;
    private DateTime endTime;
    public int ID
    {
        get { return id; }
        set { id = value; }
    }
    public DateTime StartTime
    {
        get { return startTime; }
        set { startTime = value; }
    }
    public DateTime EndTime
    {
        get { return endTime; }
        set { endTime = value; }
    }
}

In the form constructor I created a List and bind the list to my gridcontrol at runtime

        List<Data> list = new List<Data>();
        list.AddRange(new Data[] {
                    new Data(1, Convert.ToDateTime("1:00:00 AM"),
                    Convert.ToDateTime("3:00:00 AM")),
                    new Data(2, Convert.ToDateTime("8:00:00 PM"),
                    Convert.ToDateTime("8:30:00 PM")),
                    new Data(3, Convert.ToDateTime("12:00:00 PM"),
                    Convert.ToDateTime("1:00:00 AM")),
                    new Data(4, Convert.ToDateTime("2:00:00 AM"),
                    Convert.ToDateTime("3:00:00 AM"))
                    });
        gridControl1.DataSource = list; 

When run the application, I get an empty grid. Somehow the columns that I created at design time are not filled correctly with the data at runtime. I try to do the same thing with no columns created at design time and the application run with correctly filled data. I am missing something.

Any ideas to debug the problem or
solve the problem will be very
appreciated. Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:46:33+00:00Added an answer on May 20, 2026 at 10:46 pm

    Set the FieldName property of your columns to ID, StartTime, EndTime (Case Sensitively!!!!). Also, I would suggest that you move your code to set the grid’s DataSource to the form’s Load event. This should help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a devexpress xtragrid with 40 columns. I compare each cell value with
I have an XtraGrid control on a windows form, bound to an object set
I have the following problem. With DevExpress I want to set an XtraGrid to
I have a Devexpress.XtraGrid.GridControl that I have set the DataSource to a DataTable .
I've a DevExpress XtraGrid control with three columns and a unbound checkBoxEdit column for
The DevExpress Grid (XtraGrid) allows grids and their groups to have summary calculations. The
Hy , I have an XtraGrid with AutoFilterRow the default Filter is : Starts
I have a devexpress xtraGrid. One column is editable. When I select the text
I have a grid (DevExpress XtraGrid, if that matters) which is bound to a
I am using Entity Framework and DevExpress 10.5 XtraGrid. Imagine that we have entities

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.