Hi,
I've added a xamDataGrid to my wpf usercontrol, but nothing displays, even though I point it at a datasource.
I'd just like to get a designer's view so that I can arrange columns, hide / show row selector, etc.
Any ideas?
I don't know how you did it. However, you should be knowledgeable about the xamDataGrid controlbinding behavior. When you bind the XamDataGrid in the designer, whether you use Visual Studio or Blend,you will not get a FieldLayout(s) generated for you.It is still required that these are generated by the developer manually.This can be done by typing xaml or by adding them through the Properties Pane/Window in Visual Studio or Blend. Once you have created the FieldLayouts and Fields, then you can use the properties window for setting propertiesthat affect how the XamDataGrid and/or fields are displayed.
If you are bind the DataSource of the XamDataGrid to a Resource, then you may see fields displayed in the designer,but this still doesn’t generate the corresponding FieldLayout.
If you are binding to the DataContext, then the Fields won’t even be visible in the designer.
For setting properties in the designer, the only option is the built in Properties pane/window in Visual Studio or Blend. If you want to be able to edit(set) any definite property through the built in properties pane/window you can log a feature request at http://devcenter.infragistics.com/Protected/RequestFeature.aspx .
To illustrate the above mentioned(in bold) bindings I will create and attach a working sample application soon.
Best Regards,Yanko
Yes, I understand what I want isn't supported yet, and have logged a feature request.
However, I am puzzled now. I did bind my grid to resource data provider, but the grid still did NOT show any columns in the designer. The columns only displayed after I setup the field layouts.
Now, the DataProvider is a 3rd party one; a CslaDataProvider (http://www.lhotka.net/cslanet/). I've already been told once that Infragistics won't "support" use of their controls with other 3rd party code.. but I hope you will change your mind on Csla. It has a fairly large following, and a common forum question is what 3rd party controls to use. Because of this attitude, many people are recommending NOT to use Infragistics. So it would be nice if more of an effort was made to work with Csla; the source code is available, so it shouldn't be difficult to either fix Infragistics controls if they aren't working, or contribute changes back to csla so they work properly (if in fact they don't).
Andy