Using the help from http://forums.infragistics.com/forums/p/16644/60759.aspx#60759, I set my columns to hide correctly. When I run the application on my dev environment, they display (hidden) correctly. When I deploy the application, the all the columns are visible. I checked .Net version, dll dependencies, everything its expecting is there. Any thoughts?
-dan
Hello Dan,
I was looking into the scenario you are describing and I am not aware for such an issue. Could you please double check if you are using some of the deployment approaches that are described at the following link from our documentation:
http://help.infragistics.com/NetAdvantage/WPF/2011.1/CLR4.0/?page=WPF_Deploying_Your_Application.html .
If you still have the issue, please do not hesitate to ask.
Elena,
I have been using the methods of deployment outlined in the link you posted.
Lets take a look at the Xaml code I am currently using.
<igDP:Field Name="LastUpdate" Visibility="Collapsed"/><igDP:Field Name="InstNumber" Label="Inst" Width=".75*"><igDP:Field.Settings><igDP:FieldSettings AllowEdit="False" CellContentAlignment="LabelAboveValueAlignCenter"/></igDP:Field.Settings></igDP:Field> <igDP:Field Name="Source" Label="Source" Width=".75*"><igDP:Field.Settings><igDP:FieldSettings AllowEdit="False" CellContentAlignment="LabelAboveValueAlignCenter"/></igDP:Field.Settings></igDP:Field> <igDP:Field Name="Run" Label="Run" Width=".75*"><igDP:Field.Settings><igDP:FieldSettings AllowEdit="False"/></igDP:Field.Settings></igDP:Field> <igDP:Field Name="BatchNumber" Label="Batch" Width=".75*"><igDP:Field.Settings><igDP:FieldSettings AllowEdit="False"/></igDP:Field.Settings></igDP:Field> <igDP:Field Name="LockedBy" Label="LockedBy" Width="*"><igDP:Field.Settings><igDP:FieldSettings AllowEdit="False"/></igDP:Field.Settings></igDP:Field>
<igDP:Field Name="State" Label="State" Width="3*"><igDP:Field.Settings><igDP:FieldSettings AllowEdit="False"/></igDP:Field.Settings></igDP:Field> <igDP:Field Name="StatusDescript" Label="Status" Width="2*"><igDP:Field.Settings><igDP:FieldSettings AllowEdit="False"/></igDP:Field.Settings></igDP:Field> <igDP:Field Name="PatternName" Label="Pattern" Width="*"><igDP:Field.Settings><igDP:FieldSettings AllowEdit="False"/></igDP:Field.Settings></igDP:Field>
The columns hide just fine....as long as the PatternName field is commented out. From what I can tell the PatternName field doesn't exist and that throws the rest of the field formatting out. I tried reproducing this with the binding to the sample data in a test app, but couldn't recreate. Thoughts?
I can’t think of any reason that can cause this behavior. Can you set AutoGenerateFilds property to false, so you don’t need to hide the column LastUpdate. For further reference about this property you can check the following blog:
http://blogs.infragistics.com/blogs/petar_monov/archive/2011/05/13/how-to-define-fieldlayouts-how-fieldlyouts-are-mapped.aspx
Is the issue reproducible in this case?
I added the AutoGenerateFields="true" attribute to my FieldLayoutSettings. I do not have to manually hide fields. Unfortunately, if I leave the PatternName field with no corresponding property in the bound data, I don't see any of the columns. If I fake the property (public string PatternName {get; set;}), then the columns show correctly.
I believe that the fact that you don’t have a PatterName field in your business object may cause this issue. In case you don’t have a corresponding property in your bound data you can try change the filed definition to UnboundField as follows:
<igDP:UnboundField Name="PatternName" Label="Pattern" Width="*"><igDP:UnboundField.Settings><igDP:FieldSettings AllowEdit="False"/></igDP:UnboundField.Settings></igDP:UnboundField>
Please let me know if after making this change the issue is still reproducible.
That appears to fix the hidden columns issue. Once I have access to the property this field should be bound to, will I have to change back to a normal field in order to display its data?
The UnboundField exposes a property “Binding” which you can set to the collection that you want to show in this field. I can suggest you bind this property to your data instead of turning the column back to an ordinary Field. When you use a Field element its Name property must match the name of a property in the business object. Unlike a regular Field object, the Name property of an UnboundField object does not have to match the name of a property in the business object. You can use the value of the Name property as a key to retrieve a reference to the UnboundField object in the Fields collection using procedural code. For further reference about the UnboundField please have a look at the following reference form our documentation:
http://help.infragistics.com/Help/NetAdvantage/WPF/2011.1/CLR4.0/html/xamDataPresenter_Displaying_a_Complex_Property.html
If you need any further assistance on this matter, please do not hesitate to ask.