Select to view content in your preferred language

About FeatureDataGrid

730
5
03-18-2011 03:49 AM
FernandoHernangomez
Deactivated User
I'm using a FeatureDataGrid to show the results of a query and it works ok.
But i wonder if it's possible the next things :

  • I only have one column. So, it's possible to force sorting, by code, after binding the control ?

  • Can i force it to active by code  'Auto Zoom to Selected'?

  • How can i translate the english texts to any language ?

Thanks you.
0 Kudos
5 Replies
JenniferNery
Esri Regular Contributor

�?�I only have one column. So, it's possible to force sorting, by code, after binding the control ?

I think you can use Linq to sort the query results by a given field/attribute before adding them to your GraphicsLayer.


�?�Can i force it to active by code 'Auto Zoom to Selected'?
�?�How can i translate the english texts to any language ?


You can customize the look and feel of your FeatureDataGrid to update the language on the template. Here's how: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2010/05/20/Use-control-templates-to-customize....

You can also set IsChecked="True" for AutoChangeMapExtentCheckBox.
0 Kudos
FernandoHernangomez
Deactivated User
I think you can use Linq to sort the query results by a given field/attribute before adding them to your GraphicsLayer.



You can customize the look and feel of your FeatureDataGrid to update the language on the template. Here's how: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2010/05/20/Use-control-templates-to-customize....

You can also set IsChecked="True" for AutoChangeMapExtentCheckBox.


Thanks, it works perfect with this :
            FeatureSet featureSet = args.FeatureSet;
                var enumGraphics = from g in featureSet
                                   orderby (g.Attributes["NOMBRE"] as string) ascending
                                   select g;
                foreach (ESRI.ArcGIS.Client.Graphic g in enumGraphics)
                    graphicsLayer.Graphics.Add(g);


About the customize of controls : It's only possible with Micosoft Expression Blend ? can i do it with Visual Studio 2010 ?

Thanks
0 Kudos
JenniferNery
Esri Regular Contributor
Yes, this feature is only available with Expression Blend, you can install trial version if you want to.
0 Kudos
FernandoHernangomez
Deactivated User
Yes, this feature is only available with Expression Blend, you can install trial version if you want to.


I had got customizing it ...... but not the TextBlock 'NumberOfRecordsTextBlock' which i think is update after fill the grid.
How can i solve this ?

Thank you very much ... with this solved i will close this thread
I promise 😉
0 Kudos
JenniferNery
Esri Regular Contributor
You should be able to change the language on NumberOfRecordsTextBlock.Text but keep the text in red ({0}, {1}), these values get updated in code-behind.
  <TextBlock x:Name="NumberOfRecordsTextBlock" Text="Records ({0} out of {1} Selected)" VerticalAlignment="Center" Margin="3,0,0,0"/>


Also, you might want to set the application CultureInfo: http://msdn.microsoft.com/en-us/library/cc838238(v=vs.95).aspx
0 Kudos