I am querying a layer in the map service and showing results in FeatureDataGrid. I have set coded domains for some fields in this layer.
The problem is when the data is displayed in FeatureDataGrid, the codes are displayed instead of actual values.Can anybody help me on this issue? I want to display actual values and not domain codes in the FeatureDataGrid.
Is there any body who can help me out on this issue? It has become really urgent for our apps.
I have observed that with identify task, it displays the domain values (not codes) properly in the FeatureDataGrid, but with other tasks, like Query (attribute and spatial), it displays the domain codes.
FeatureDataGrid uses ComboBox controls to show codes in CodedValueDomain attributes. This is by-design and if you want to show the values instead, you should set FDG's "AutoGenerateColumns" property to FALSE and in its "Columns" collection use "DataGridTextColumn" for those attributes. For more information please take a look at the following URL to see how you can manually populate columns in a DataGrid control: http://msdn.microsoft.com/en-us/library/system.windows.controls.datagridtextcolumn%28v=vs.95%29.aspx
I would give a try. But it does not sound good to manually populate all the values in FDG. My concern is that FDG should honor built in options like Zoom to selection, clear selection etc. even if it is manually populated.
Anyways, thanks again for your reply and I would put my result over here.
My concern is that FDG should honor built in options like Zoom to selection, clear selection etc. even if it is manually populated.
All the functions in the Options menu will be still honored. By setting FDG's AutoGenerateColumns property to FALSE you control how the attribute collection for each row should be shown. Some examples would be hiding an attribute in your datagrid columns, or showing hyperlink values in the cells for a given attribute, etc..
But it does not sound good to manually populate all the values in FDG.
The values won't be manually populated. It's just the matter of controlling the way each column in the FeatureDataGrid control should be shown.