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
I've never seen columns appear in the designer. I just assumed it wasn't supported functionality, at all. Is anyone saying they see columns at design time?
That matches my experience; the only time I've seen columns is if you set ShowSampleData (or some such property) to true, which uses some schema based on a fictional car object.
I am supposed to have help with the styling of our Xaml app. I am a developer and maybe like the others, my skill is in data base and providing system functionality, not making a border around a cell a specific color. Being that Xaml is new and I may not get the services of the graphics designer, I am formulating a plan to help me with the grid styling. I can share that plan with you but it may not help you with specifics.
I have used a Theme supplied by Infragistics for development so far, "Theme=LunaOlive". This color matches closely with the color requirements of the system as a whole. I plan on disecting this theme and taking the pieces I want for the Grid Theme for our system. I do not want MouseOver or MouseHover colors which the the LunaOlive theme contains. I want a CellValuePresenter style that shows a field in the grid has been changed. I am going to style the HeaderPresenter and RowSummaryPresenter. I hope disecting an existing theme is going to show me all the style points and allow me to choose the style points I want to incorporate.
I have taken the Infragistics sponsored WPF training. Curtis Taylor taught the class and he used Expression Blend to perform most of the styling, switching between EB and Visual Studio depending on if he was providing functionality or styling. It may be that we programmers, if we are going to have to do the styling, are going to have to be EB users as well. I am not an EB user and do not have Expression Blend installed yet. I am still holding out hope for help with the styling. If you are able to use VS to bind the XamDataGrid to your specific data and not sample data, and then switch to EB to style the grid with your data showing, this would be a method to see in real time. What about it Curtis, can you bind data in Visual Studio and then style the grid in Expression Blend using the bound data? I think you can I just don't have all the tools to try it.