DataGrid

Discussion in 'Silverlight' started by Zhang JingChu, Oct 4, 2011.

  1. DataGrid

    I am using a free opensource class from a company that I will not name (even if it is RadiantQ) that I like a lot. It has this cool MuttiColumnTreeList control that is a combination of a tree control and a datagrid. It comes with an example code that you can look at and everything. It is pretty cool. It is inherited from the DataGrid class.

    The problem is that I am kind of new to databinding on this level and so I would like to just go ahead and write some code that forces the data that I have gathered from another class into the control.

    So I looked online for how to do that for a DataGrid class and the information is not easily available. Can anyone help?
     
  2. Zhang, I'm kind of new to wpf and silverlight too but have been studying it for a bit and have just finshed a small wpf application and silverlight intranet application.

    Main then to remember is xaml is about about databinding so the main way i like to do it is to get your data from your datasource, db, xml, flat file in a collection that can be databound to like an observable collection. once you have your data make sure you set the DataContext property of the control or data templete to you newly created observable collection.

    It's best to start small like a list of person or whatever. Keep it simple. the first try i did was like three levels deep don't do this. remember to make sure your classes can be bindable so you have to make all properties dependency properties and all list should be observable collections.

    good luck!
     

Share This Page