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

  • Home
  • SEARCH
  • 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 6904305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:02:34+00:00 2026-05-27T08:02:34+00:00

Lets say that I have the two following classes public class OtherClass { public

  • 0

Lets say that I have the two following classes

public class OtherClass
{
    public string OtherName{ get; set; }
}

public class MyClass
{
    public string TheName { get; set; }
    public int TheAge { get; set; }
}

lets say that I bound the XtraGrid to the Object datasource (MyClass )

Now, My scenario is that I want to populate the first column (TheName) when I click the Editor button with OtherName values came from list of OtherClass object (List<OtherClass>)

then finally transfer the whole Row back to MyClass object

is that possible?

  • 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-27T08:02:35+00:00Added an answer on May 27, 2026 at 8:02 am

    maybe like this:

            List<MyClass> mylist = new List<MyClass>();
            mylist.Add(new MyClass() { TheName = "Kirk", TheAge = 56 });
            mylist.Add(new MyClass() { TheName = "Spock", TheAge = 403 });
            mygrid.DataSource = mylist;
            mygrid.MainView.PopulateColumns();
    
            List<OtherClass> all_names = new List<OtherClass>();
    

    add existing names here :

            foreach (var item in mylist)
                all_names.Add( new OtherClass() { OtherName = item.TheName } );
    

    continue with additional names:

            all_names.Add(new OtherClass() { OtherName = "Watson" });
            all_names.Add(new OtherClass() { OtherName = "Sherlock" });
    

    create repositoryItemLookUpEdit1 via designer

            repositoryItemLookUpEdit1.DataSource = all_names;
            repositoryItemLookUpEdit1.DisplayMember = "OtherName";
            repositoryItemLookUpEdit1.ValueMember = "OtherName";
            ((DevExpress.XtraGrid.Views.Base.ColumnView)mygrid.MainView).Columns[0].ColumnEdit = repositoryItemLookUpEdit1;
    

    and your data should be fine

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

Sidebar

Related Questions

Let's say I have the following two classes: public class Person { public string
Let's say I have the following two classes: public class TestResults { public string
Let's say I have two classes like the following: Class A { public: ..
Lets say I have the following code: public class Base { // Some stuff
Lets say I have the following two PHP arrays that contain integers: $foo =
Lets say I have two tables - Cat and Cat owner that are linked
I have following scenario: Lets say we have two different webparts operating on the
Lets say I have a schema that defines the following XML: <Values> <Add Key=Key1>Value
Let's say I have the following class structure: class Car; class FooCar : public
Let's say we have two objects. Furthermore, let's assume that they really have no

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.