FarPoint Forums
The FarPoint Message Boards
Welcome to FarPoint Forums
Sign in
|
Join
|
Help
in
Data Binding (forum)
Spread for Windows Forms (.NET) (group)
(Entire Site)
Search
Forums
Photos
FarPoint Forums
»
Spread for Windows Forms (.NET...
»
Data Binding
»
Re: data binding custom object collection.
data binding custom object collection.
Last post 05-09-2008, 2:31 PM by
parez81
. 6 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
05-09-2008, 11:10 AM
63256
parez81
Joined on 03-06-2008
Posts 56
data binding custom object collection.
Reply
Quote
I have class A
class
{
string ristname
string lastname}
}
and collection List<A> someList;
On my form i have a grid and some fields which represent A.
I create object A and how do i add it to grid..
Report abuse
05-09-2008, 11:31 AM
63259
in reply to
63256
BobM
Joined on 03-06-2003
Posts 6,310
Re: data binding custom object collection.
Reply
Quote
Spread does not support binding to a list that contains another class...
http://www.clubfarpoint.com/Forums/forums/thread/60986.aspx
Bob M.
FarPoint Technologies, Inc.
Report abuse
05-09-2008, 11:51 AM
63261
in reply to
63259
parez81
Joined on 03-06-2008
Posts 56
Re: data binding custom object collection.
Reply
Quote
The code below works only for one qualifier.. only the first time.. it shows one row in the gird..
public ObservableCollection<Qualifier> Qualifiers { get; set; }
private void ui_addQualifier_Click(object sender, EventArgs e)
{
Qualifier qualifier = GetQualifierFromForm();
this.ConfirmationID = "Confirm";
Qualifiers.Add(qualifier);
ui_qualifierList.ActiveSheet.DataSource = this.Qualifiers;
ui_qualifierList.Refresh();
}
Report abuse
05-09-2008, 11:55 AM
63262
in reply to
63261
BobM
Joined on 03-06-2003
Posts 6,310
Re: data binding custom object collection.
Reply
Quote
Yes, that is what happens when trying to do what you are doing.
Bob M.
FarPoint Technologies, Inc.
Report abuse
05-09-2008, 12:31 PM
63266
in reply to
63262
parez81
Joined on 03-06-2008
Posts 56
Re: data binding custom object collection.
Reply
Quote
so should i use a strongly typed dataset instead of the list?
Report abuse
05-09-2008, 12:33 PM
63268
in reply to
63266
BobM
Joined on 03-06-2003
Posts 6,310
Re: data binding custom object collection.
Reply
Quote
I would highly recommend that approach.
Bob M.
FarPoint Technologies, Inc.
Report abuse
05-09-2008, 2:31 PM
63280
in reply to
63262
parez81
Joined on 03-06-2008
Posts 56
Re: data binding custom object collection.
Reply
Quote
Hi
I managed to do what i was trying to by doing the following.
Qualifier qualifier = GetQualifierFromForm();
this.ConfirmationID = "Confirm";
Qualifiers.Add(qualifier);
ui_qualifierList.ActiveSheet.Models.Data = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(this.Qualifiers, typeof(Qualifier));
Report abuse
FarPoint Forums Home