Select to view content in your preferred language

FeatureDataGrid Date

661
2
05-05-2011 11:53 AM
DarellStoick
Occasional Contributor
I have a SQL dateTable with a field called
LOG_TIMESTAMP SQL DataType is -datetime

This table is used as a the source for an XY Event layer in an mxd.
The mxd is the source of a service in ArcGIS Server Manager. 

In a simple Silverlight app based on http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureDataGrid

Create a Feature Layer
<esri:FeatureLayer ID="LayerName" Url="http://.../0" FeatureSymbol="{StaticResource SelectSymbol}">
                        <esri:FeatureLayer.OutFields>
                            <sys:String>*</sys:String>
                        </esri:FeatureLayer.OutFields>

                    </esri:FeatureLayer>



Create a FeatureDataGrid

 <esri:FeatureDataGrid x:Name="MyDataGrid" 
                                  Margin="1"
                                  LoadingRow="MyDataGrid_LoadinRow" 
                                  GraphicsLayer="{Binding Path=Layers[LayerName], ElementName=MyMap}"
                                  Map="{Binding ElementName=MyMap}" Width="398" Height="121">
               
            </esri:FeatureDataGrid>



In MyDataGrid_LoadinRow
Dim myValue = e.Row.DataContext



If I test myValue I get
?myValue.[GetType]().GetProperty("LOG_TIMESTAMP").GetValue(myValue, Nothing)
#5/2/2011 1:34:06 PM# {Date}
    Date: #5/2/2011 1:34:06 PM#

In the grid I only get 5/2/2011 and no time?

The ESRI Type seems right on the rest endpoint
LOG_TIMESTAMP (Type: esriFieldTypeDate, Alias: LOG_TIMESTAMP, Length: 16 )

Any Ideas on why I'm only getting the Date part of the System.DateTime

SDK 2.1
ArcServer 10 sp1
0 Kudos
2 Replies
ChristopherHill
Deactivated User
We are aware of this issue and are looking into a solution. Only date is being displayed and the editing control is a datepicker which only changes the date portion of the DateTime. The Time portion is there its just not being displayed in the FeatureDataGrid. you can modify the datetime stored in the garphic attributes, but the FeatureDataGrid by default modifies the date.
0 Kudos
DanMcCoy
Frequent Contributor
Chris,

Is there a bug # associated with this issue?

Thanks,

Dan
0 Kudos