This is a migrated thread and some comments may be shown as answers.

wpf Binding?

2 Answers 100 Views
GridView
This is a migrated thread and some comments may be shown as answers.
sivakanth
Top achievements
Rank 1
sivakanth asked on 28 Jul 2011, 05:02 AM
Hello,
 
        I have a small doupt about wpf binding
 
here i have three classes,
 
class LoanViewBO
{
  private string _companyName;
  private List<LoanBO> _loans;
 
  public string CompanyName
  {
   get { return _companyName; }
   set { _companyName = value; }
  }
  public List<LoanBO> Loans
  {
   get { return _loans; }
 
   set { _loans = value;}
  }
}
  
class LoanBO
{
  private List<LoanItemBO> _loanItems;
  private string _loanNumber;
  private string _items;
  private string _reference;
   
  public List<LoanItemBO> LoanItems
  {
   get { return _loanItems; }
   set { _loanItems = value;}
  }
  public string LoanNumber
  {
   get { return _loanNumber; }
   set { _loanNumber = value; }
  }
  public string Items
  {
   get {return _items;}
   set { _items = value;}
  }
  public string Reference
  {
   get { return _reference; }
   set { _reference = value; }
  }
}
   
   
 
class LoanItemBO
 {
  private int? _loanID;
  private string _loanNumber;
  private int? _itemID;
  private string _itemName;
   
  public int? LoanID
  {
   get { return _loanID; }
   set { _loanID = value; }
  }
  public string LoanNumber
  {
   get { return _loanNumber; }
   set { _loanNumber = value; }
  }
  public int? ItemID
  {
   get { return _itemID; }
   set { _itemID = value; }
  }
  public string ItemName
  {
   get { return _itemName; }
   set {_itemName = value;}
  }
}
 
 
Here i have only one textBox. which is going to bind Companyname..
also i have two Telerik DataGrid .First dataGrid Bind with Loans and second dataGrid Bind with
LoanItems .How to bind with in XAML? here i want to do Insert operation..how i should
assign DataContext in Code , XAML and Bindings?(here one Loan may have many LoanItems)
anybody suggest me? it will be appreciate. and also i want empty row when loading?
Thank you..

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 28 Jul 2011, 07:05 AM
Hi Sivakanth,

I would recommend you to run through our online documentation and demos. A good start will be the Data Binding and Populating with Data  sections. 

Greetings,
Maya
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
sivakanth
Top achievements
Rank 1
answered on 28 Jul 2011, 07:16 AM
Hello, 
          I can't find correct solution.
could you give me sample solution?
         here i want Insert operation only. so i want empty row in each GridView when window loading...

Thank you..
Tags
GridView
Asked by
sivakanth
Top achievements
Rank 1
Answers by
Maya
Telerik team
sivakanth
Top achievements
Rank 1
Share this question
or