How to display actual values stored in domain?

889
5
02-01-2011 03:29 AM
SanajyJadhav
Occasional Contributor II
Hi experts,

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.

Any help would be appreciated.

Regards,
Sanjay.
0 Kudos
5 Replies
SanajyJadhav
Occasional Contributor II
Hi,

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.

Is this a bug or I am missing something?

Please help me on this issue.

Regards,
Sanjay.
0 Kudos
AliMirzabeigi
New Contributor
Sanjay,

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
0 Kudos
SanajyJadhav
Occasional Contributor II
Thanks Ali.

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.

-Sanjay.
0 Kudos
AliMirzabeigi
New Contributor

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.
0 Kudos
SanajyJadhav
Occasional Contributor II
Ali,

Sorry for the late reply.Somehow I overlooked your reply. I am working on it.

Thanks and regards,
Sanjay.
0 Kudos