G
g18c
Hi, i have bound my list of objects to a data grid view (i have
actually used BindingList) and can add, edit objects ok. Sample object
is given below:
class MyObject
{
string m_Name;
public string Name
{
get { return m_Name; }
set { m_Name = value; }
}
List<int> m_List = new List<int>();
public List<int> MyList
{
get { return m_List; }
set { m_List = value; }
}
}
I can display and edit the name field ok. However, as you can see my
object also contains a List<int> but i am not given the option to
display this in the properties when i goto add a new column. How could
i go about displaying a list of ints (ideally i would like a custom
display, where i can list the ints, one to five in this example, in a
text box seperated by commas ie "1, 2, 3, 4").
Do i need to add the column manually, hook into the format event or
define my own cell types?
Thanks in advance,
Chris
actually used BindingList) and can add, edit objects ok. Sample object
is given below:
class MyObject
{
string m_Name;
public string Name
{
get { return m_Name; }
set { m_Name = value; }
}
List<int> m_List = new List<int>();
public List<int> MyList
{
get { return m_List; }
set { m_List = value; }
}
}
I can display and edit the name field ok. However, as you can see my
object also contains a List<int> but i am not given the option to
display this in the properties when i goto add a new column. How could
i go about displaying a list of ints (ideally i would like a custom
display, where i can list the ints, one to five in this example, in a
text box seperated by commas ie "1, 2, 3, 4").
Do i need to add the column manually, hook into the format event or
define my own cell types?
Thanks in advance,
Chris